[wp-trac] [WordPress Trac] #33106: Automatic removal of new lines in CDATA blocks may break content with unfiltered_html
WordPress Trac
noreply at wordpress.org
Fri Jul 24 18:14:05 UTC 2015
#33106: Automatic removal of new lines in CDATA blocks may break content with
unfiltered_html
-----------------------------+--------------------
Reporter: jeremyfelt | Owner:
Type: defect (bug) | Status: new
Priority: highest omg bbq | Milestone: 4.2.4
Component: Formatting | Version: 4.2.3
Severity: major | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+--------------------
Comment (by kitchin):
Appears that ->autoembed does not do the embedding, instead it
canonicalizes the text for later work by the oEmbed service, and for the
`[embed]` shortcode.
I'm attaching my patch with a third test case, using
`apply_filters('the_content', ....)` to get a bigger picture:
* If youtube link: any `[embed]` is removed from around the link.
* If youtube link: canonicalized from `http://.../embed/...` to
`https://.../watch?v=...`.
* Other links: `[embed]` becomes `<a href=...`.
* Other links without `[embed]`: no change.
Not sure the third test should be checked in, it's not targeted to a
single issue.
All 3 tests I've written fail before your patch and succeed after.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33106#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list