Open ChrisKaun opened 5 years ago
I suspect this is a limitation in MS Word since that "name" parameter is used as the filename inside the DOCX zip file structure. Word gets around this by renaming everything image1, image2, etc. My advice would be to just strip out the special characters entirely.
As you already mentioned a valid work around in my case is to strip the special characters from the file name.
What happens when a file is directly loaded from a path, without specifying a filename
parameter?
Sablon.content(:image, 'fixtures/images/c3pö.jpg')
Would this still fail?
Don't think that the special characters should be stripped inside the sablon-code, but a note should be added to the docs that some characters might not be supported.
Hey,
I'm rendering an image to sablon content via uri and filename
Sablon.content(:image, uri, filename: name)
.If the
name
variable contains any special characters likeä, ü, ö, ß
this will fail and sablon will display a blackish image replacement instead.