#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11

    Formatting output: converting CRLF to html.


    I am inserting the data into the table and it appears that the CRLF is preserved (solid upright bars appear where CRLFs occur), however, these are not preserved on the output.

    Does ayone know how I can ensure that, just as they are done in this post, (though I realize this is PHP and not CFM) the carriage returns are converted to <p> or <br> tags for the output?
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,275
    Rep Power
    968
    Use paragraphFormat() around the output. This translates one CRLF into a space, and two CRLF's in a row to paragraph tags.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    Originally Posted by kiteless
    Use paragraphFormat() around the output. This translates one CRLF into a space, and two CRLF's in a row to paragraph tags.
    Do you know the syntax for that?
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,275
    Rep Power
    968
    <cfoutput>
    #paragraphFormat( someVariableWithCRLFInIt )#
    </cfoutput>
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    Perfect!

    Thank you!

IMN logo majestic logo threadwatch logo seochat tools logo