Question

I need to take some raw text and convert the linefeeds to HTML breaks.

This does not work.

myhtml=Replace(myhtml, chr(13), "<br>")

What Does?

Was it helpful?

Solution

Chr(13) may not be the end-of-lines in your text, also Replace() only works on the first occurence. Try this...

myhtml = ReplaceAll(myhtml, EndOfLine.Unix, "<br>")

and test with the EndOfLine variations Macintosh and Windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top