Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#17106 closed defect (bug) (fixed)

oEmbed - PollDaddy regex needs updating

Reported by: r-a-y's profile r-a-y Owned by: duck_'s profile 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 14 years ago.
17106.02.patch (833 bytes) - added by r-a-y 14 years ago.
17106.03.patch (834 bytes) - added by r-a-y 14 years ago.
Escapes period.

Download all attachments as: .zip

Change History (11)

@r-a-y
14 years ago

#1 @r-a-y
14 years ago

  • Cc r-a-y@… added

#2 @nacin
14 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/).

#3 @r-a-y
14 years ago

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

Removing the subdomain will work.
New patch fixes this.

@r-a-y
14 years ago

@r-a-y
14 years ago

Escapes period.

#4 @duck_
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 @r-a-y
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

#6 @azaozz
14 years ago

How about

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

#7 @SergeyBiryukov
13 years ago

  • Milestone changed from Awaiting Review to 3.3

#8 @duck_
13 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.