I'm Using File (Field) Paths

“&” displaying as “&” in the file name

i tried to solve it by change the the display of the field to plain text and use the token view mode but nothing change

Any help?


1 Answer 1


You should always prevent special characters in filenames, this can lead to strange behavior. Specifically because certain characters can be part of a query string (example.com/index.php?var1=value1&var2=value2).

I recommend the Transliteration module (assuming Drupal 7) to remove these charaters form the filename. If that does not help (or if you are using Drupal 8), you might want to take another look at you upload configuration. There might be a token provided by File (Field) Paths that does provide you with a good encoded name.

  • i already tried Transliteration ! but didn't give me a good result the name was example " Cool &amp Awsome" to "cool_amp_awsome" . and i want to show the file name "Cool & Awsome" . and i'm sure the problem is in token ! so any help please
    – MohK
    Dec 7, 2016 at 21:14
  • 1
    That happens if you transliterate afterwards, if you transliterate on upload it should create a name like cool_awsome. Perhaps still not exactly what you want but less ugly. I do not know why the ampersand appears to be escaped twice. Might be bug in one of the upload or display modules you use. See if the problem persists if you remove some modules. Dec 7, 2016 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.