News Module replacing dash in filenames

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
moonie
Forum Members
Forum Members
Posts: 81
Joined: Tue Feb 13, 2007 3:08 pm

News Module replacing dash in filenames

Post by moonie »

Hello everyone

I've noticed on 3 different installations that the latest News module (2.51.8 under the latest CMS Version 2.2.13) keeps replacing dashes in file uploads to - instead. So a file-name.jpg becomes a file-name.jpg. Underscores are still working and don't get replaced.

This wasn't the case in News 2.51.6 and CMS 2.2.12 for instance. Any idea in what file to look to find the replacing logic?
Attachments
news.jpg
news.jpg (6.47 KiB) Viewed 1270 times
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1800
Joined: Wed Feb 25, 2009 4:25 am

Re: News Module replacing dash in filenames

Post by DIGI3 »

There's a bug report for this: http://dev.cmsmadesimple.org/bug/view/12207

My workaround has been to use |replace in the template, something like

Code: Select all

<img src="{$item->fielddefs.image|replace:'&#45;':'-'}" />
or if you're using CGSmartImage it seems to handle it okay.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”