Opened 15 years ago
Closed 15 years ago
#12115 closed defect (bug) (fixed)
Viddler embeds broken by wpautop() due to line breaks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | high |
Severity: | normal | Version: | 2.9.1 |
Component: | Embeds | Keywords: | has-patch |
Focuses: | Cc: |
Description
Viddler contains some new lines too that completely breaks the embed due to silly wpautop()
. It shouldn't add <br />
's in the middle of HTML tags, but that's a fix for another day.
Worth putting into 2.9 branch.
Attachments (2)
Change History (11)
#1
@
15 years ago
- Summary changed from Fix Viddler Embeds to Viddler embeds broken by wpautop() due to line breaks
#3
@
15 years ago
- Keywords commit removed
if we decide to keep the regexp, it should at least be fixed, e.g.
$domains = array('foo.com', 'bar.com'); $domains = implode('|', array_map('preg_quote', $domains)); if ( preg_match( "#^https?://(?:www\.)?(?:$domains)/#i", ...
#7
@
15 years ago
- Milestone changed from 2.9.3 to 3.0
Viddler has since fixed this, so no need to commit to the 2.9 branch.
After discussion with Viper in IRC, I've removed the regexp check on the provider, and instead went to a simple strpos to identify any newlines, to slightly improve performance and future-proof any providers that return new lines in the embed code.
Note: See
TracTickets for help on using
tickets.
I'd like to suggest a tiny enhancement to this patch: remove the regexp outright. it's not anchored, and as such serves no purpose beyond slowing things down.