Oracle 11g: Keeping user input format as entered, display on page
Hello, all,
I have hit a brick wall, and could use some advice.
I am working on a customized blog that allows users to comment on threads. HTML is not allowed, and is stripped out before the content is inserted into the database (Oracle 11g, TEXT datatype). But if a user hits the enter key within the textarea, that line break is retained in Oracle. However, displaying the input after pulling it from the database loses line breaks.
What is the best way to keep the formatting as the user entered it (including bullet points) for display in an HTML page? I tried the <pre> tags around the output, but that strips font CSS from the display, and puts a horizontal scrollbar at the bottom of the containing div.
I tried putting <p> tags in place of line breaks, but then when the comment is edited, the HTML shows in the form textarea. (That's not good, either.)
What are some options?
V/r,
^ _ ^
