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: Replace sanitize-svg with dompurify #4557

Merged
merged 3 commits into from Sep 23, 2023
Merged

fix: Replace sanitize-svg with dompurify #4557

merged 3 commits into from Sep 23, 2023

Conversation

raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Sep 22, 2023

☑️ Resolves

  • This fixes the display of NcIconSvgWrapper on iOS Safari. Safari wouldn't render the SVG if it has no width and height set.
  • Moves from skjnldsv/sanitize-svg to dompurify
  • Uses a computed instead of beforeMount and a method. @Pytal Any reason why this was a method? If yes, we can revert the last commit.

🖼️ Screenshots

🏚️ Before 🏡 After
image image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

Related to #4312 which introduced the problem, I think.

PS: If you wonder, why the dependency to skjnldsv/sanitize-svg is still in package-lock.json, this is because we depend on nextcloud\dialogs@4.2.0 which has a dependency to nextcloud/vue@7.12.4.

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
@raimund-schluessler raimund-schluessler marked this pull request as ready for review September 22, 2023 20:31
@raimund-schluessler raimund-schluessler added bug Something isn't working 3. to review Waiting for reviews regression Regression of a previous working feature labels Sep 22, 2023
@raimund-schluessler raimund-schluessler added this to the 8.0.0 milestone Sep 22, 2023
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Also better performance wise

@skjnldsv skjnldsv merged commit f621f66 into master Sep 23, 2023
16 checks passed
@skjnldsv skjnldsv deleted the fix/noid/svg-ios branch September 23, 2023 09:45
@Pytal Pytal mentioned this pull request Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants