Opened 14 years ago
Closed 13 years ago
#17106 closed defect (bug) (fixed)
oEmbed - PollDaddy regex needs updating
Reported by: | r-a-y | Owned by: | duck_ |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Embeds | Keywords: | has-patch |
Focuses: | Cc: |
Description
PollDaddy's oEmbed regex needs updating so it correctly embeds.
Attached patch.
Attachments (3)
Change History (11)
#3
@
14 years ago
You're correct about hardcoding "/poll/".
Removing the subdomain will work.
New patch fixes this.
#4
@
14 years ago
I think we will want to add an escaped dot to the regex:
#http://(.+)?\.polldaddy\.com/.*#i
to avoid matching completely different domains, e.g. http://notpolldaddy.com/, and only allow polldaddy.com subdomains.
#5
@
14 years ago
If you update the patch to add the dot, then would the following not match:
http://polldaddy.com/poll/xxx
I kind of copied the regex that Smugmug was using ;)
http://core.trac.wordpress.org/browser/trunk/wp-includes/class-oembed.php#L46
Note: See
TracTickets for help on using
tickets.
This will break old form URLs. The oembed handler should instead be adjusted to handle these. We could also remove the subdomain requirement and send all subdomains, but we shouldn't make it more restrictive (i.e. /poll/).