Author: ptw
Date: 2006-11-15 05:52:04 -0800 (Wed, 15 Nov 2006)
New Revision: 2535
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
Log:
Change 20061114-ptw-y by [EMAIL PROTECTED] on 2006-11-14 17:53:22 EST
in /Users/ptw/OpenLaszlo/legals-2/WEB-INF/lps/lfc
Summary: Add quirk to translate ' to '
Bugs Fixed:
LP-2880 'window in component sampler doesn't display apostrophes in IE 6, dhtml'
Technical Reviewer: max (Message-ID: <[EMAIL PROTECTED]>)
QA Reviewer: bmandel (pending)
Doc Reviewer: n/a
Details:
Use an alternate strategy for inner_html_strips_newlines, since
that was causing HTML entities to not be interpreted in IE. Add
another quirk to deal with IE HTML not supporting ' (which is
valid, it's just that all the other browsers do).
Tests:
examples/components/window_example.lzx?lzr=dhtml correctly shows
apostrophes and double quotes as expected in IE, Safari, and
FireFox.
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2006-11-15 05:50:06 UTC (rev 2534)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2006-11-15 13:52:04 UTC (rev 2535)
@@ -146,7 +146,8 @@
,invisible_parent_image_sizing_fix: false
,disable_opacity: false
,emulate_flash_font_metrics: true
- ,ie_inner_html_strips_newlines: false
+ ,inner_html_strips_newlines: false
+ ,inner_html_no_entity_apos: false
}
LzSprite.prototype.quirks.__BrowserDetect.init();
@@ -176,7 +177,10 @@
LzSprite.prototype.quirks['fix_ie_background_height'] = true;
// workaround for IE stripping newlines from innerHTML
- LzSprite.prototype.quirks['ie_inner_html_strips_newlines'] = true;
+ LzSprite.prototype.quirks['inner_html_strips_newlines'] = true;
+
+ // workaround for IE not supporting ' in innerHTML
+ LzSprite.prototype.quirks['inner_html_no_entity_apos'] = true;
}
if (LzSprite.prototype.quirks.__BrowserDetect.browser == 'Safari') {
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
2006-11-15 05:50:06 UTC (rev 2534)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
2006-11-15 13:52:04 UTC (rev 2535)
@@ -83,13 +83,16 @@
// TODO: [2006-10-02 ptw] Use 'pre-line' when supported.
if (this.multiline && t && (t.indexOf("\n") >= 0)) {
this.__LZdiv.style['whiteSpace'] = 'pre';
+ if (t && this.quirks['inner_html_strips_newlines']) {
+ t = t.replace(RegExp('$', 'mg'), '<br />');
+ }
} else {
this.__LZdiv.style['whiteSpace'] = 'normal';
}
+ if (t && this.quirks['inner_html_no_entity_apos']) {
+ t = t.replace(RegExp(''', 'mg'), ''');
+ }
this.__LZdiv.innerHTML = t;
- if (LzSprite.prototype.quirks['ie_inner_html_strips_newlines']) {
- this.__LZdiv.innerText = t;
- }
// reset the size cache
if (this._textsizecache) this._textsizecache = {};
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins