Repository navigation
Icons: Allow rect and circle in the registry sanitizer
#82846
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
63d4af4
allow rect and circle in icon registry sanitizer
retrofox ac6b73e
add backport changelog entry for #82846
retrofox b7c8dd7
Merge branch 'trunk' into fix/icon-registry-rect-circle
retrofox f333229
Merge branch 'trunk' into fix/icon-registry-rect-circle
retrofox 66fc8e3
Merge remote-tracking branch 'origin/trunk' into fix/icon-registry-re…
retrofox f2a148e
add `opacity` prop to `path`
retrofox b01fa4d
Merge branch 'trunk' into fix/icon-registry-rect-circle
retrofox 4141378
Merge remote-tracking branch 'origin/trunk' into fix/icon-registry-re…
retrofox 553201d
fix formatting issue
retrofox 336db81
remove potential duplicated tests
retrofox 1300021
Merge remote-tracking branch 'origin/trunk' into fix/icon-registry-re…
retrofox 0c820ea
linting issues
retrofox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| https://github.com/WordPress/wordpress-develop/pull/12197 | ||
|
|
||
| * https://github.com/WordPress/gutenberg/pull/78808 | ||
| * https://github.com/WordPress/gutenberg/pull/82846 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree that this test is useful, it seems to go well beyond the scope of this PR. Furthermore, if this test is truly necessary, we should directly test the
sanitize_icon_content()method using a reflection class, rather than relying on theregister()andget_registered_icon()methods (see here for reference). Could we remove this test from this PR for now, and handle testing for the icon package in a separate PR?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, Aki.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@retrofox, what do you think about completely removing this test in this PR? I have already prepared a separate dedicated PR for similar tests. #83008
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to me, @t-hamano. Let me do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only
test_library_icon_survives_sanitizationor all of them?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we just need to delete
data_library_icons(),get_svg_structure(), andtest_library_icon_survives_sanitization(). I think we can keeptest_rect_and_circle_survive_sanitization().