fix line breaks for IE6

This commit is contained in:
Doug Bell 2010-02-22 18:14:13 -06:00
parent f240635a3d
commit 8d4a63b774

View file

@ -416,8 +416,8 @@
str = str.replace(/{/gi, 'RIGHT_BRACKET');
str = str.replace(/}/gi, 'LEFT_BRACKET');
// &nbsp; before <br> for IE8 so lines show up correctly
if ( this.browser.ie && this.browser.ie <= 8 ) {
// &nbsp; before <br> for IE6 so lines show up correctly
if ( this.browser.ie && this.browser.ie <= 6 ) {
str = str.replace(/\r?\n/g, "&nbsp;<br>");
}
@ -574,7 +574,12 @@
var html = this.getEditorText();
// Fix line breaks
html = html.replace( /\n/g, "<br>");
if ( this.browser.ie <= 6 ) {
html = html.replace( /\n/g, "&nbsp;<br>" );
}
else {
html = html.replace( /\n/g, "<br>");
}
html = html.replace( /\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;" );
// Apply new highlighting