Reputation: 11045
My problem is simple. I am trying to replace all the <br/>
characters from a string by \n
and display all the resulted string in a <textarea>
element.
CODE:
textarea.innerHTML = s.innerHTML.replace(/(\r\n|[\r\n])/g, '').replace(/<br[\s\/]?>/gi, '\n');
Inside the textarea, I should see separated lines by "\n". It works in any browsers, including IE6, but not in IE9. What is wrong? Thanks!
Upvotes: 0
Views: 1244