[wp-trac] [WordPress Trac] #33106: Removal of newlines in CDATA breaks inline scripts
WordPress Trac
noreply at wordpress.org
Tue Jul 28 23:02:06 UTC 2015
#33106: Removal of newlines in CDATA breaks inline scripts
-----------------------------+--------------------------
Reporter: jeremyfelt | Owner: miqrogroove
Type: defect (bug) | Status: closed
Priority: highest omg bbq | Milestone: 4.2.4
Component: Formatting | Version: 4.2.3
Severity: major | Resolution: fixed
Keywords: has-patch | Focuses:
-----------------------------+--------------------------
Changes (by wonderboymusic):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"33469"]:
{{{
#!CommitTicketReference repository="" revision="33469"
Protect newlines inside of `CDATA`. This was breaking things, notably
inline JS that used comments for HTML standards compat.
* Tokenize newlines in `WP_Embed::autoembed()` before running
`->autoembed_callback()`
* Tokenize newlines with placeholders in `wpautop()`
* Introduce `wp_html_split()` to DRY the RegEx from
`wp_replace_in_html_tags()` and `do_shortcodes_in_html_tags()`
Adds unit tests.
Props miqrogroove, kitchin, azaozz.
Fixes #33106.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33106#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list