Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post

    Problem with Replace(vbCrLf, "<br />")

    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.

  • #2
    Regular Coder
    Join Date
    May 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Replace(Chr(13), "<br/>")

  • #3
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post
    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....streply&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.

  • #4
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post
    I think I have found the answer to my question on one of your old posts otaku149

    http://www.codingforums.com/showpost...8&postcount=17

    Edit: Actually I think this is something else
    Last edited by CurtWRC; 12-19-2006 at 08:35 PM.

  • #5
    Regular Coder
    Join Date
    May 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #6
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post
    I have changed the function now. I don't know if it will work right though. I have changed the output from:

    Code:
    <b>$1</b>
    to

    Code:
    <b>$1</b><br />


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •