...

View Full Version : Problem with Replace(vbCrLf, "<br />")



CurtWRC
12-19-2006, 02:06 PM
On my forum I use a text box to allow members to post messages. I store what they enter how it is, then replace certain parts when displaying the message. However for some reason occasionally the line break (vbCrLf) doesn't seem to work, and members are having to make a double space to show a new line in their post. How can I fix this?

Thanks.

otaku149
12-19-2006, 04:27 PM
Replace(Chr(13), "<br/>")

CurtWRC
12-19-2006, 09:16 PM
That isn't making any difference. I don't think Ive correctly labeled this thread. The problem isnt really with the Replace() function, its more to do with the fact 'vbCrLf' isn't being stored. It seems to happen more often when text is made bold before it.

Otaku149, as you are a member on my forum (Rallystuff.net) could you try previewing a post here to see what I mean:

http://www.rallystuff.net/forumpost.aspx?action=postreply&id=415

if you put:

1
2
3

it previews correctly. However if you then make '1' and '2' bold it appears on the same line like:

1
2 3


Thanks,
Curt.

CurtWRC
12-19-2006, 09:28 PM
I think I have found the answer to my question on one of your old posts otaku149 :)

http://www.codingforums.com/showpost.php?p=481348&postcount=17

Edit: Actually I think this is something else

otaku149
12-20-2006, 01:12 PM
I made the test but I don't get the same result as you.

if you put:
[ b ]1[ /b ]
[ b ]2[ /b ]
3

the preview result is:
1
2
3

CurtWRC
12-20-2006, 03:15 PM
I have changed the function now. I don't know if it will work right though. I have changed the output from:


<b>$1</b>

to


<b>$1</b><br />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum