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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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


1373 Views

Avatar
BlueO

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?

cheers

Bernard