#2166 closed defect (bug) (fixed)
# in uploaded image filename breaks uploader
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 1.2 |
| Severity: | normal | Keywords: | bg|has-patch bg|commit |
| Cc: |
Description
Rename an image to have a # in it, ex:
2003 Dodge Viper SRT-10 #09.jpg
If you upload it, it uploads fine, but then when it goes to display the thumbnail or insert into the post, this is the URL it uses:
2003%20Dodge%20Viper%20SRT-10%20#09.thumbnail.jpg
Rather than:
2003%20Dodge%20Viper%20SRT-10%20%2309.thumbnail.jpg
That causes a 404 on the image.
No patch as I don't know Javascript.
Attachments (2)
Change History (9)
comment:2
davidhouse
— 7 years ago
- Keywords bg|has-patch added
davidhouse
— 7 years ago
comment:3
skeltoac
— 7 years ago
- Status changed from new to assigned
wp-admin/admin-functions.php line 1752 is the only place that needs rawurlencode. However, when I test in FF and IE, %23 is in the src and href but the browser decodes it and puts # in the request, which of course gets a 404.
I think it would be better to replace # with _
Note: See
TracTickets for help on using
tickets.
There wasn't actually any javascript involved. :) This patch will need a quick run-through by the committor, because I don't use the image uploader and so I'm not entirely sure if the patch works completely or not.