jEditable Unexpectedly Strips Newlines from Display in IE
I'm using jEditable to allow users to edit content in a PRE block. But IE7 and IE8 are failing to honor newlines (\n) and instead smashes all the content into a single line. It works fine in FF, Safari, Chrome but fails in IE. Has anyone else seen this behavior? Why would the newline characters get stripped?
Code Sample:
jQuery('.edit').editable(function(value, settings)
{
//nl2br
html_val = value.replace(/\r?\n/ig, '<br/>' );
return html_val;
},
{
type : 'textarea',
height : '120',
cancel : 'Cancel',
submit : 'Save Changes',
indicator : '<img src="/images/indicator.gif">',
tooltip : 'Click to edit...',
cssclass : 'inherit',
onblur : 'submit'
});