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.
When trying to insert a file named "start middle end.png", I get "startend.png" in the src attribute, so the file can't be found. The preview is OK. It only happens when using Transliteration, whether resize_filter is used or not.
Comment | File | Size | Author |
---|---|---|---|
#3 | insert_empty_attributes.patch | 578 bytes | quicksketch |
Comments
Comment #1
quicksketchI cannot reproduce this issue. Upon uploading a file with the name "start middle end.png", it is automatically renamed to "start_middle_end.png" due to transliteration. Inserting the image produces the expected code:
I'll need directions to reproduce from a clean install, as it doesn't seem to be a problem with just Insert, ImageField, and Transliteration.
Comment #2
GaëlGOops sorry, it seems like drupal.org displays two spaces as only one. The name is
start middle end.png
which get renamed tostart__middle__end.png
. As the title mentions, it's two DOUBLE spaces. I know, this is a strange name, but we're always victims of Murphy's law.Comment #3
quicksketchThanks, sorry this took ages to address, but with two underscores I can see exactly what's happening. Because our placeholders are demarked with double underscores, we try to "clean up" left over placeholders that weren't used, such as __description__ or __alt__. This patch corrects the problem by only matching for entirely empty attributes with quotes immediately following and preceding the placeholder, which will prevent this replacement of double underscores elsewhere (such as in the path).
This patch also addresses #1492872: Empty title attributes being matched for captions, since it was right there also.