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

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


Reply


3 Posts   1875 Views

Avatar
pali

Community Member, 33 Posts

10 June 2009 at 12:19am

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

Avatar
Hamish

Community Member, 712 Posts

10 June 2009 at 1:40pm

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.

Avatar
pali

Community Member, 33 Posts

10 June 2009 at 7:23pm

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