Skip to main content
Inspiring
April 27, 2006
Answered

Capturing returns and other special characters

  • April 27, 2006
  • 2 replies
  • 300 views
Greetings,
I'm curious to know what is 'normally' done to capture returns and other special characters from textareas. I want my user to be able to insert 'control' characters into the text area to allow them to provide some structure to the information they're entering. At the moment, I'm processing the text char by char and working out if it's an 'enter' or whatever, then appending a '<br />' to the string before I store it and so on.

Is there a more established way to do this sort of thing?
    This topic is closed to new replies. Start a new post to keep the conversation going.
    Correct answer Dan_Bracuk
    Use the replace function to replace either chr(10) or chr(13) with a break tag. It's using cold fusion functions to accomplish the same thing you appear to be doing manually.

    2 replies

    MrBonkAuthor
    Inspiring
    April 27, 2006
    Thanks for that.....exactly what I was looking for :-)
    Dan_BracukCorrect answer
    Inspiring
    April 27, 2006
    Use the replace function to replace either chr(10) or chr(13) with a break tag. It's using cold fusion functions to accomplish the same thing you appear to be doing manually.