rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Foggy on March 29, 2008, 05:30:01 AM
-
I have a form that sends multiline text which is saved and can be viewed later on. but I am having trouble with the line brakes(enter/return key) because html needs </br> to start a new line.
The text comes through fine in hfs and saves in the file with the line breaks, etc but html wont show it properly and places it all on one line and then wraps it.
I can set the css style to white-space:pre and the line breaks are follow but the text is no longer wrapped.
is there a way in hfs to replace the line breaks with </br>
eg
{.replace|
|</br>|text
that is
multiline.}
returns
text</br>that is</br>multiline.
-
Look at my question about that problem at:
http://www.rejetto.com/forum/index.php?topic=5353.msg1033879#msg1033879 (http://www.rejetto.com/forum/index.php?topic=5353.msg1033879#msg1033879)
and rejetto's answer with a proposed workround.
... we must wait for next build to use it.
-
Thanks Bacter, I must have missed that post. This will fix the problem I am having in my other thread. When I posted the first one I didn't think of this way around it.
-
You do realize the tag is
<br/>
right?
-
You do realize the tag is
<br/>
right?
lol, yeah. I must have been tired and got a closing tag confused with an empty tag.
-
yes, i confirm it will be available soon
-
procedure convert();
begin
if sameText(p, 'ansi') and sameText(par(1), 'utf-8') then result:=ansiToUTF8(par(2))
else if sameText(p, 'utf-8') and sameText(par(1), 'ansi') then result:=utf8ToAnsi(par(2))
else if sameText(p, 'html') and sameText(par(1), 'text') then result:=StringReplace(par(2),'<BR>',CRLF,[rfReplaceAll, rfIgnoreCase]) //add by mars
else if sameText(p, 'text') and sameText(par(1), 'html') then result:=StringReplace(par(2),CRLF,'<BR>',[rfReplaceAll, rfIgnoreCase]) //add by mars end; // convert
Not include <br /> to CRLF (just a beta test)