Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Replacing carriage return with HTML "<br/>"

6462Apr 24 2004 — edited Apr 25 2004
All,

I have a textarea in an HTML page that receives text input from the user. The text is stored in a varchar2 column and then rendered back into the HTML page as static text.

I'd like to make it easy for the end user and not force them to enter "<br/>" characters (exactly how this forum works) for new lines and paragraphs.

On the insert trigger for the note text, I'm thinking of using:
:new.note_text := replace(:old.note_text, chr(0), '<br/>');
1) Will this work?
2) Is this the best way to do this?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2004
Added on Apr 24 2004
6 comments
1,813 views