Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Slash character in content

Go to End



Community Member, 52 Posts

25 February 2013 at 11:12am

Hi There,

We've got an intranet site on 2.4 where people want to be able to post filepaths to network drives (eg E:\somepath\tofile.txt). So we've got an input field setup as HTMLText that will save the slashes if they are escaped (eg E:\\somepath\\tofile.txt). But then when displaying this field in a template the slashes are removed presumably as a security feature.
I can display them but outputing them using RAW (eg $Content.RAW) but this feels dirty... is there a better way to do this?