Make WordPress Core

Opened 7 years ago

Last modified 6 years ago

#44074 new defect (bug)

oEmbed with many <pre> tags do not work

Reported by: jagszent's profile jagszent Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Embeds Keywords:
Focuses: Cc:

Description

If an oEmbed has more than ten <pre> tags WP_oEmbed::_strip_newlines (called by oembed_dataparse} filter) returns a wrong result for it.

All <pre> tags get temporarily replaced by a token, the newline stripping gets done and then the tokens <pre> get replaced back to their HTML. The tokens unfortunately are just __PRE__ plus a counter (e.g. __PRE__0, __PRE__1) Thus if there are more than ten <pre> tags there will be tokens like __PRE__10. These obviously clash with previous tokens.

Granted, this is quite uncommon but nonetheless it should be fixed in my opinion.

Attachments (2)

44074-fix1.diff (518 bytes) - added by jagszent 7 years ago.
Possible fix #1
44074-fix2.diff (508 bytes) - added by jagszent 7 years ago.
Possible fix #2

Download all attachments as: .zip

Change History (3)

@jagszent
7 years ago

Possible fix #1

@jagszent
7 years ago

Possible fix #2

#1 @pento
6 years ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.