Answered
Capturing returns and other special characters
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?
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?
