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

Prevent parse and remove my javascript code

Go to End

4 Posts   1580 Views


Community Member, 15 Posts

16 July 2010 at 10:39am

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 ?


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.


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


Community Member, 15 Posts

26 July 2010 at 8:22am

somebody can help me ?