Jump to:

22977 Posts in 11758 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » TextareaField generates <br /> tags. How to disable this behaviour?

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: 1748 Views
  • pali
    Avatar
    Community Member
    33 Posts

    TextareaField generates <br /> tags. How to disable this behaviour? Link to this post

    Hello,

    im using TextareaField for storing Adsense code. Generated code is splited into new lines. If i place this code, everything is OK, but if I reopen & republish, its lost. I think its because its replacing new lines with break tag <br />. Any idea?

    Regards

    Pali

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: TextareaField generates <br /> tags. How to disable this behaviour? Link to this post

    It's probably better to put your adsense stuff into your templates, rather than make them editable from the CMS. Still, are you sure that it is happening in the CMS? What does the template look like? Make sure you're using the raw result, and not converting to XML at some point.

  • pali
    Avatar
    Community Member
    33 Posts

    Re: TextareaField generates <br /> tags. How to disable this behaviour? Link to this post

    My customer cant edit template if something changes in the future He doesnt have enought skills to do it.

    It doesnt make sense, that in databased CMS is problem with storing data like adsense code and suggestion is "place it in template" I saw this suggestion in more places in this forum...

    Im not converting into XML. If i place code in backend and hit "Save and Publish" output on website is correct. Problems is here -> i reopen page in backend -> in this case is my code changed (<br /> replacing new lines) and when i hit "Save and Publish" code in frontend is broken...

    Pali

    1748 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.