#31212 closed defect (bug) (fixed)
oEmbed discovery fails on XHTML head links
Reported by: | cweiske | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Embeds | Keywords: | has-patch |
Focuses: | Cc: |
Description
In XHTML, link tags in the HTML head need to be closed:
<link title="test" href="http://example.org/test"/>
Wordpress' oEmbed discovery in WP_oEmbed::discover()
fails on this.
It extracts the attributes ( title="test" href="http://example.org/test"/
) and sends it through shortcode_parse_atts
. The trailing slash is included even though it's not part of the attributes.
Either discover()
's link tag should not match the slash, or shortcode_parse_atts
should be changed to cope with it.
Attachments (1)
Change History (4)
#2
@
10 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 31407:
#3
@
9 years ago
In general, I'd argue that /U
(PCRE_UNGREEDY) should not be used. It isn't natural to read a regular expression as if things are un-greedy; using ?
to make something lazy/reluctant/nongreedy is going to be easier to understand.
/U
is also sometimes misread as /u
which is for UTF-8 (and also should not be used in many cases).
Patch that fixes the problem.