-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Icons Registry: improve SVG sanitizer #75550
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
Open
t-hamano
wants to merge
37
commits into
trunk
Choose a base branch
from
icon-registry-sanitizer
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+950
−0
Open
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
26a51db
Icons Regstry: improveme SVG sanitizer
t-hamano 4ae7479
WIP
t-hamano a777fff
Improve unit test
t-hamano 2bd0b84
Format
t-hamano 3dc5e28
Add missing elements
t-hamano 8708824
Remove redundant def element
t-hamano 5c36d1f
Add temporary backport changelog
t-hamano e8f8a31
Merge branch 'trunk' into icon-registry-sanitizer
t-hamano d4f4022
Consolidate icon registry sanitize tests into a single test file
t-hamano 06dbc86
Reject malformed SVG when the processor errors or pauses incomplete
t-hamano ae4140d
Branch xmlns:xlink test expectation by WordPress version
t-hamano 49f6a74
Merge branch 'trunk' into icon-registry-sanitizer
t-hamano c360d0c
Allow all ARIA states/properties and data-* attributes in icon SVGs
t-hamano d5c5967
Add type hints to sanitize_icon_content()
t-hamano 5a99e53
Use array_fill_keys() for SVG attribute allow-lists
t-hamano 97d3002
Use @link tag for dmsnell PR reference in docblock
t-hamano 39deef1
Skip leading comments and XML declarations before the SVG element
t-hamano 29eca95
Return null from sanitize_icon_content() on failure
t-hamano dc2ab15
Merge branch 'trunk' into icon-registry-sanitizer
t-hamano 0993ad8
Drop parameter type hint to stay compatible with the parent signature
t-hamano a46f913
Revert "Return null from sanitize_icon_content() on failure"
t-hamano cf0d2a3
Use array_fill_keys() for the remaining SVG attribute lists
t-hamano c7ff855
Add backport changelog
t-hamano d3ee803
Rename backport changelog file to match its PR number
t-hamano 381209c
Skip ReflectionMethod::setAccessible() on PHP 8.1+
t-hamano 20abfeb
Use @link for WAI-ARIA spec reference in sanitize_icon_content()
t-hamano 33f767d
Use @link for Trac changeset reference in icons registry test
t-hamano 5b2e3d4
Sort SVG sanitizer attribute lists alphabetically
t-hamano e39539b
Extract get_allowed_attribute_list() helper to build kses attribute l…
t-hamano c7a1947
Merge branch 'trunk' into icon-registry-sanitizer
t-hamano b88395f
Fix incorrect PHPDoc tags
t-hamano 1fe8e6c
Resolve leftover merge conflict in icons registry test
t-hamano 0c76fa6
Merge branch 'trunk' into icon-registry-sanitizer
t-hamano f203e7d
Icons: Reject foreign-namespaced <svg> in sanitizer
t-hamano f4c78d9
Icons: Relax SVG extraction but reject multiple roots
t-hamano de4e098
Merge branch 'trunk' into icon-registry-sanitizer
t-hamano a3b0fac
Merge remote-tracking branch 'origin/trunk' into icon-registry-sanitizer
t-hamano 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| https://github.com/WordPress/wordpress-develop/pull/12197 | ||
|
|
||
| * https://github.com/WordPress/gutenberg/pull/75550 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.