Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22796 closed defect (bug) (fixed)

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

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

Description

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 12 years ago.
22796.2.diff (4.9 KB) - added by koopersmith 12 years ago.
22796.3.diff (4.9 KB) - added by koopersmith 12 years ago.
Removes a redundant !!

Download all attachments as: .zip

Change History (7)

@koopersmith
12 years ago

#1 @nacin
12 years ago

  • Keywords dev-reviewed added

Simple coding error caused by accidentally overwriting a variable.

#2 @nacin
12 years ago

  • Keywords dev-reviewed removed

#3 @sc0ttkclark
12 years 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)

@koopersmith
12 years ago

@koopersmith
12 years ago

Removes a redundant !!

#4 @ryan
12 years 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.