Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Prevent parse and remove my javascript code

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

Page: 1
Go to End
Author Topic: 1171 Views
  • alienn
    Avatar
    Community Member
    15 Posts

    Prevent parse and remove my javascript code Link to this post

    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 ?

  • charden
    Avatar
    Community Member
    7 Posts

    Re: Prevent parse and remove my javascript code Link to this post

    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.

  • alienn
    Avatar
    Community Member
    15 Posts

    Re: Prevent parse and remove my javascript code Link to this post

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

  • alienn
    Avatar
    Community Member
    15 Posts

    Re: Prevent parse and remove my javascript code Link to this post

    somebody can help me ?

    1171 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.