WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#29474 closed defect (bug) (fixed)

oEmbed previews ignore width and height attributes

Reported by: johnbillion Owned by: nacin
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Embeds Keywords: has-patch commit
Focuses: Cc:

Description

Steps to reproduce:

Paste the following into the editor:

[embed width="200" height="200"]https://www.youtube.com/watch?v=n52tAhXzO5E&hd=1[/embed]

Note that the preview which appears does not respect the width and height attributes of the [embed] shortcode.

This has been narrowed down to a lack of wp_unslash() on $_POST['shortcode'] in wp_ajax_parse_embed().

Attachments (1)

29474.patch (1.8 KB) - added by azaozz 6 years ago.

Download all attachments as: .zip

Change History (7)

This ticket was mentioned in IRC in #wordpress-dev by johnbillion. View the logs.


6 years ago

@azaozz
6 years ago

#2 @azaozz
6 years ago

  • Keywords needs-testing added; needs-patch removed

After a group debugging in IRC, 29474.patch fixes it here.

#3 @iseulde
6 years ago

Looks good to me! :)

#4 @helen
6 years ago

  • Keywords has-patch commit added

#5 @nacin
6 years ago

  • Keywords needs-testing removed

#6 @nacin
6 years ago

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

In 29681:

Ensure oEmbed previews listen to [embed] width/height attributes.

props azaozz.
fixes #29474.

Note: See TracTickets for help on using tickets.