Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
https://drupal.org/node/2125287/revisions/view/6669797/6669825
I uploaded an image with spaces in the name, and copied the file name into an img tag. d.o had added %20 everywhere, but that made the image show the big red X for hotlinked images.
Reverting the %20 back to spaces made it work.
Remaining Tasks
- (novice) Backport | Contributor task document for backporting a patch -- backport the d8 core patch from #2096855-13: FilterHtmlImageSecure does not support images with spaces in the filename to this project
- add tests
Comment | File | Size | Author |
---|---|---|---|
#24 | Screen Shot 2014-06-11 at 8.18.39 PM.png | 190.05 KB | webchick |
#19 | spaces-2125301-19.patch | 2.5 KB | Steven Jones |
#19 | spaces-2125301-19-just-tests.patch | 1.64 KB | Steven Jones |
#14 | spaces-2125301-14.patch | 884 bytes | mgifford |
#10 | Screen Shot 2014-03-16 at 11.41.17 AM.png | 64.45 KB | mgifford |
Comments
Comment #1
Gábor HojtsyI've experienced this before the upgrade as well and just developed a practice to not include spaces in the filenames :) I agree it should ideally work :)
Comment #2
hass CreditAttribution: hass commentedAlso expierenced this before upgrade. This is really bad and should be fixed as you cannot copy/past a link from a browser as these woll contain the hex values, not only for spaces...
Comment #3
tim.plunkettI think I only hit this because dreditor's "insert image" button is currently broken :)
Comment #4
hass CreditAttribution: hass commentedNope.
Comment #5
eliza411 CreditAttribution: eliza411 commentedComment #6
Wim LeersIndeed, this is pre-existing. And it was solved in Drupal 8 core: #2096855: FilterHtmlImageSecure does not support images with spaces in the filename.
Comment #7
hass CreditAttribution: hass commentedBackporting these one liner to D7 should be done than, isn't it?
Comment #8
klonosThe "insert/edit image" BUeditor button pre-fills the file url as
http://drupal.org/files/
while after the d.o D7 upgrade files uploaded to issues are actually underhttps://drupal.org/files/issues/
. This needs to be addressed too. Different issue?Comment #9
klonos...I filed #2157113: The "insert/edit image" BUeditor button still pre-fills the file url as http://drupal.org/files/ for the issue I mentioned in #8.
Comment #10
mgiffordPosting an example:
Comment #11
tvn CreditAttribution: tvn commentedMoving to Local Image input filter queue. Per #2096855-19: FilterHtmlImageSecure does not support images with spaces in the filename this should be fixed here.
Comment #12
sunThis has been fixed in D8 already, so all that is needed here is a 1:1 backport of the patch in
#2096855-13: FilterHtmlImageSecure does not support images with spaces in the filename
Comment #13
YesCT CreditAttribution: YesCT commentedupdating issue summary with instructions
Comment #14
mgiffordNo tests, but probably not needed here. This should work...
Comment #15
sunThis is a security related filter module. Like any other change, this one definitely requires tests, too.
Comment #16
YesCT CreditAttribution: YesCT commentedComment #17
webchickThis is a huge pain in the butt when taking screenshots on Mac. I easily lose 10-15 minutes every couple of days manually futzing with these URLs.
Comment #18
Steven Jones CreditAttribution: Steven Jones commentedGoing to have a look at this one.
Comment #19
Steven Jones CreditAttribution: Steven Jones commentedHere's a couple of patches, one has just the tests, the other tests plus fix from #14.
Enjoy!
Comment #21
drummLooks good.
(I just enabled https://drupal.org/node/1274626/qa today, so the bot didn't pick up this patch.)
Comment #22
tvn CreditAttribution: tvn commentedComment #23
drummNow deployed on Drupal.org.
The filter cache will hold on to previously-filtered images until cleared.
Comment #24
webchickThanks so much. :D
Comment #25
Wim LeersYay++++++++++++ :)