How to remove <br> within a <textarea></textarea> only

Abdess

New Member
I have some articles stored in a text field in my database. There are times when the article includes \[code\]<textarea>content.....</textarea>\[/code\]The problem is that when the content is displayed on a page using php, it includes the actual \[code\]<br><br><br>\[/code\]. The \[code\]<br>\[/code\] is placed there by the text editor (CKEditor)So it looks like the following\[quote\] \[code\]<textarea>\[/code\] <-- this actually becomes a textarea This content is shown inside the text area\[code\]<br>\[/code\] but the problem is that the \[code\]<br>\[/code\] is also shown. \[code\]</textarea>\[/code\]\[/quote\]How can I strip \[code\]<br>\[/code\] from the \[code\]<textarea>\[/code\] tags only. I imagine some preg replace would be useful.
 
Back
Top