192
rated 0 times
[
193]
[
1]
/ answers: 1 / hits: 67029
/ 13 Years ago, thu, september 8, 2011, 12:00:00
I have HTML data stored in database which I wish to display as is. It keeps converting
tags to <br />
which is a behavior I do not want. I have tried playing with javascript replace and still I am unable to convert it to regular HTML.
var venueaddress = msg.result[0].venueaddress;
var venueaddress2 = venueaddress.replace([newline], <br />);
alert(venueaddress2); //shows <br />
$(#venueaddress).text(venueaddress2); //lets now display it on the browser
<li><h3>Venue Address</h3><p><strong> <span id=venueaddress></span> </strong></p></li>
However when it renders on browser, it has the <br /> and there fore there is no line break.
More From » html