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

Prevent parse and remove my javascript code


Go to End


4 Posts   1914 Views

Avatar
alienn

Community Member, 15 Posts

16 July 2010 at 10:39am

Hey
i have small problem with my site

i've created another page with additional box for custom stuff :

$fields->addFieldToTab('Root.Content.Custom', new TextAreaField('Stuff'));

and the problems are that
- silverstripe adds a lot of CDATA
- automaticly remove "</script" from content
- replacing eg \" with \&quot;" etc

how to prevent this from happening ?

Avatar
charden

Community Member, 7 Posts

16 July 2010 at 8:36pm

If you would like to access the raw value of a field from a template you can use the RAW getter: $Stuff.RAW should do it if I understand your problem correctly.

Avatar
alienn

Community Member, 15 Posts

20 July 2010 at 5:11am

litle bit better but most important problems still appear like :
"</script>" is automaticly removed from content and is stored like that in database

Avatar
alienn

Community Member, 15 Posts

26 July 2010 at 8:22am

somebody can help me ?