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, biapar, Willr, Ingo, swaiba, simon_w

Prevent parse and remove my javascript code


Reply

4 Posts   1182 Views

Avatar
alienn

16 July 2010 at 10:39am Community Member, 15 Posts

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

16 July 2010 at 8:36pm Community Member, 7 Posts

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

20 July 2010 at 5:11am Community Member, 15 Posts

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

26 July 2010 at 8:22am Community Member, 15 Posts

somebody can help me ?