Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Fix Show details summary #6113

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Apr 27, 2023

@github-actions
Copy link
Contributor

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Make sure to check off this list before asking for review.

@@ -5,8 +5,20 @@ import xss, { friendlyAttrValue } from 'xss';
*/

export function sanitizeHtml(dirtyHtml: string) {
const allowedAttributes = ['href', 'name', 'target', 'title', 'class', 'id'];
const allowedTags = ['p', 'strong', 'b', 'code', 'a', 'br', 'i', 'em', 'small'];
const allowedAttributes = ['href', 'name', 'target', 'title', 'class', 'id', 'style'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move these out of the function body, so that these are reused and we aren't creating extra work for the GC.

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Patch coverage: 84.21% and project coverage change: +0.09 🎉

Comparison is base (f91923a) 19.11% compared to head (d45e197) 19.20%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6113      +/-   ##
==========================================
+ Coverage   19.11%   19.20%   +0.09%     
==========================================
  Files        2588     2589       +1     
  Lines      116755   116903     +148     
  Branches    18336    18339       +3     
==========================================
+ Hits        22314    22455     +141     
- Misses      93802    93803       +1     
- Partials      639      645       +6     
Impacted Files Coverage Δ
packages/editor-ui/src/utils/htmlUtils.ts 38.70% <33.33%> (+3.32%) ⬆️
packages/editor-ui/src/constants.ts 98.18% <93.75%> (-0.14%) ⬇️

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Apr 27, 2023
Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏽

@github-actions
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@ivov
Copy link
Contributor Author

ivov commented Apr 27, 2023

e2e failures look unrelated. Re-ran here and this time 17-sharing.cy.ts passed but 18-user-management.cy.ts failed, also with timeout errors. Omar is seeing this as well.

@ivov
Copy link
Contributor Author

ivov commented Apr 28, 2023

@netroy Can you approve here again? I re-ran e2e a third time and it passed. We can look at the flakiness separately.

@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@ivov ivov merged commit 90a62cc into master Apr 28, 2023
@ivov ivov deleted the ado-367-bug-error-not-clickable-cannot-expand-it branch April 28, 2023 15:16
MiloradFilipovic added a commit that referenced this pull request May 2, 2023
* master: (37 commits)
  fix(editor): Fix copy selection behavior (#6112)
  fix(core): Account for nodes with renamable content (#6109)
  fix(editor): Fix quote handling on dollar-sign variable completions (#6128)
  fix(editor): Fix cropped off completions docstrings (#6129)
  fix(Date & Time Node): Numbers conversions fix
  fix(Merge Node): Do not error if expected key is missing
  fix(core): Improve saml endpoints and audit events (#6107)
  fix: Prevent displaying an endless timer in the execution list for finished executions (#6137)
  fix(editor): Fix `Show details` summary (#6113)
  fix(editor): Fix sidebar button styling (#6138)
  fix(editor): Fix unique names for node duplication (#6134)
  fix(editor): Fix missing `Stop Listening` button (#6125)
  fix(editor): Fix unscrollable node settings (#6133)
  fix(core): Avoid using `Object.keys` on Buffer and other non-plain objects (#6131)
  fix(editor): Change execution list tab loader design (#6120)
  fix(Slack Node): Restore ability to send text in addition of blocks or attachments
  feat(editor): Add support for `loadOptionsDependsOn` to RLC (#6101)
  fix: Correctly allow sharees to test credential when opening the modal (#6111)
  fix(core): Fix `hasOwnProperty` on augmented objects (#6124)
  fix(core): Only take into account users that active for the first time to show activation modal (no-changelog) (#6121)
  ...
MiloradFilipovic added a commit that referenced this pull request May 2, 2023
…rce-mapper-ui-P2

* feature/resource-mapping-component: (37 commits)
  fix(editor): Fix copy selection behavior (#6112)
  fix(core): Account for nodes with renamable content (#6109)
  fix(editor): Fix quote handling on dollar-sign variable completions (#6128)
  fix(editor): Fix cropped off completions docstrings (#6129)
  fix(Date & Time Node): Numbers conversions fix
  fix(Merge Node): Do not error if expected key is missing
  fix(core): Improve saml endpoints and audit events (#6107)
  fix: Prevent displaying an endless timer in the execution list for finished executions (#6137)
  fix(editor): Fix `Show details` summary (#6113)
  fix(editor): Fix sidebar button styling (#6138)
  fix(editor): Fix unique names for node duplication (#6134)
  fix(editor): Fix missing `Stop Listening` button (#6125)
  fix(editor): Fix unscrollable node settings (#6133)
  fix(core): Avoid using `Object.keys` on Buffer and other non-plain objects (#6131)
  fix(editor): Change execution list tab loader design (#6120)
  fix(Slack Node): Restore ability to send text in addition of blocks or attachments
  feat(editor): Add support for `loadOptionsDependsOn` to RLC (#6101)
  fix: Correctly allow sharees to test credential when opening the modal (#6111)
  fix(core): Fix `hasOwnProperty` on augmented objects (#6124)
  fix(core): Only take into account users that active for the first time to show activation modal (no-changelog) (#6121)
  ...
netroy pushed a commit that referenced this pull request May 2, 2023
* 🐛 Fix `Show details` summary

* 🚚 Move constants out of sanitizer
@janober
Copy link
Member

janober commented May 2, 2023

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants