WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 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)

17106.01.patch (840 bytes) - added by r-a-y 3 years ago.
17106.02.patch (833 bytes) - added by r-a-y 3 years ago.
17106.03.patch (834 bytes) - added by r-a-y 3 years ago.
Escapes period.

Download all attachments as: .zip

Change History (11)

r-a-y3 years ago

comment:1 r-a-y3 years ago

  • Cc r-a-y@… added

comment:2 nacin3 years ago

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/).

comment:3 r-a-y3 years ago

You're correct about hardcoding "/poll/".

Removing the subdomain will work.
New patch fixes this.

r-a-y3 years ago

r-a-y3 years ago

Escapes period.

comment:4 duck_3 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.

comment:5 r-a-y3 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

comment:6 azaozz3 years ago

How about

#http://(.+\.)?polldaddy\.com/.*#i

comment:7 SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.3

comment:8 duck_2 years ago

  • Owner set to duck_
  • Resolution set to fixed
  • Status changed from new to closed

In [19076]:

Fix polldaddy oEmbed regular expression to work with new style URLs. Props r-a-y, azaozz. Fixes #17106.

Note: See TracTickets for help on using tickets.