Forum Moderators: coopster
This could generate headaches if after updating you re-display the “updates” in the editors and if the form is resubmitted.
The result becomes ugly: Any time it is re-submitted a new set of <br /> is added!
So the trick is to undo the <br /> at the editor output level by using
For ex:
$patterns[o]= ‘/<br \/>/’;
$replace[0]= ‘ ‘;
$test=pre_replace($patterns, $replace, $test);
Or is there another function that undo nlbr2() like code, encode…
To answer the original question though, no -- to the best of my knowledge there is no built-in function to remove the <br />. You would have to write your own regular expression.
However, if you use the content-editing area as described above, you won't have to worry about them.