By: Rafael
Date: 2006-10-04
Time: 21:03
|
<br /> tags when showing texts
Hi there!
I'm getting this problem:
I have to save in my data base some text, actually, its a description os the courses given in my work... so.. when i save it at the db, everything is normal. The problem is when i show the description at my saite or at a text area to change de description. The text is shown with <br /> tags where it should be new line marks...
If i didn't make myself clear, please, report me. =/
|
By: TomH
Date: 2006-10-04
Time: 23:29
|
Re: <br /> tags when showing texts
If I understand you correctly, you want to keep the HTML tags that are coming from the db
TBS allows you to define how to handle the HTML in block values
try [block.val;htmlconv=no]
See the manual for more on TBS Fields
htmlconv=val Enables you to force or prevent the conversion of the data item to Html text.
The value val can be one of the following keywords:
yes: (default value) Force the conversion to Html including new lines.
no: Prevent the conversion to Html. Useful to modify Javascript code or to modify the Html source.
nobr: Force the conversion to Html but new lines (useful for <pre> tags for example).
wsp: Preserve white spaces (useful for spaces at the beginning of lines).
esc: No Html conversion and double the single quote characters (').
js: Convert the data item to a string that can be inserted between JavaScript text delimiters.
look: Convert the data item to Html only if no Html entities are found inside the data item.
You can specify several values using seperator '+'. Example : htmlconv=yes+js |
|
By: Rafael
Date: 2006-10-05
Time: 13:44
|
Re: <br /> tags when showing texts
No exactly this.. I want to remove the <br /> tags.
When I include a text it already saves with these tags, but couldn't exist...
This is givin me some headache... as I have the same script working correctly, but saving in another database...
|
By: Skrol29
Date: 2006-10-07
Time: 03:11
|
Re: <br /> tags when showing texts
Hi,
It seems that your application is saving data applying nl2br() on it.
You should convert </br> to "/r/n" before to save data, or use an "onformat" function in TBS which would make this conversion.
|
|
Posting in progress.
Please wait...
|