[wp-trac] [WordPress Trac] #58921: wp_kses_allowed_html doesn't allow to add esi:include
WordPress Trac
noreply at wordpress.org
Sat Jul 29 10:05:24 UTC 2023
#58921: wp_kses_allowed_html doesn't allow to add esi:include
--------------------------------------+------------------------------
Reporter: alekv | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by costdev):
The change in #34105 made sense as custom elements can have hyphens in
multiple places.
The elements listed in [https://www.w3.org/TR/esi-lang/ ESI Language
Specification 1.0] only seem to indicate a prefix of `esi:`, so allowing
`:` in general may not be preferable when we could just allow a tag to
start with `esi:`.
This way:
- We can be specific in adding support for ESI.
- We won't lock ourselves into a BC promise for some other format that we
aren't intending to support at this time.
For example:
{{{
^<\s*(/\s*)?((?:esi:)?[a-zA-Z0-9-]+)([^>]*)>?$
}}}
- [https://regex101.com/r/4z7KHX/1 Regex101] with some example data in
named groups.
- [https://3v4l.org/2EqHW 3v4l] showing the regex matching all `esi:`
elements mentioned in [https://www.w3.org/TR/esi-lang/ ESI Language
Specification 1.0].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58921#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list