Make WordPress Core

#22796 closed defect (bug) (fixed)

Images using query parameters with an uncommon filetype are not recognized in insert from URL

Reported by: koopersmith Owned by: ryan
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:


We're being a little overzealous when trimming the query parameter, as we use the URL variable to double check that nothing has changed in the image's onload callback.

Patch fixes the issue, an example test URL is http://syndetics.com/index.php?isbn=9781423146193/lc.jpg&client=milwp&type=rn12

Attachments (3)

22796.diff (830 bytes) - added by koopersmith 17 months ago.
22796.2.diff (4.9 KB) - added by koopersmith 17 months ago.
22796.3.diff (4.9 KB) - added by koopersmith 17 months ago.
Removes a redundant !!

Download all attachments as: .zip

Change History (7)

koopersmith17 months ago

comment:1 nacin17 months ago

  • Keywords dev-reviewed added

Simple coding error caused by accidentally overwriting a variable.

comment:2 nacin17 months ago

  • Keywords dev-reviewed removed

comment:3 sc0ttkclark17 months ago

Please also strip off the : at the end, the Twitter API returns image files for different sizes like urlhere.com/image.jpg:large

(if it's not too late)

koopersmith17 months ago

koopersmith17 months ago

Removes a redundant !!

comment:4 ryan17 months ago

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

In 23110:

When inserting from URL in the media modal, retain query params and properly insert the caption code.

Props koopersmith
fixes #22796

Note: See TracTickets for help on using tickets.