Hi Max,
I found some issues with this changeset:
LzText.lzs: onencoded is not defined with DeclareEvent
LzText.lzs: The variable 'encoded' is not defined (ie: var encoded = false;)
LzText/LzInputText: The comment doesn't match the code:
if (this.encoded) {
// escape all & and <
var s = t.split('<');
t = s.join('<');
}
Do you only want to encode '<'?
The behavior in swf and dhtml differ. Run my sample app in both
environments and you'll see what happens.
<canvas debug="true">
<dataset name="ds">
<item text="one" />
<item text="2<5<10" />
<item text="ten" />
</dataset>
<simplelayout axis="y" spacing="10"/>
<text bgcolor="yellow">2<5<10</text>
<text encoded="false" bgcolor="yellow">2<5<10</text>
<text encoded="true" bgcolor="yellow">2<5<10</text>
<inputtext bgcolor="yellow">2<5<10</inputtext>
<inputtext encoded="false" bgcolor="yellow">2<5<10</inputtext>
<inputtext encoded="true" bgcolor="yellow">2<5<10</inputtext>
<grid datapath="ds:/" contentdatapath="item" />
</canvas>
Change 20070503-maxcarlson-j by [EMAIL PROTECTED] on 2007-05-03
18:46:57 PDT
in /Users/maxcarlson/openlaszlo/legals-clean
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Add 'encoded' attribute to LzText to specify whether HTML
escaping should be used
New Features:
Bugs Fixed: LPP-1948 - 'less than' character in gridtext and
inputtext truncating line
Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: lzx.rnc - Add 'encoded' attribute to LzText.
LzSprite.js - Unify browser sniffing code.
LzText.lzs - Add setEncoded() and 'encoded' property. If true, text
passed to setText() changes '<' to '<'.
LzInputText.lzs - Add setEncoded() and 'encoded' property. If true,
text passed to setText() changes '<' to '<'.
gridtext.lzx - use encoded property to allow display of <
embednew.js - Unify browser sniffing code.
Tests: see http://jira.openlaszlo.org/jira/browse/LPP-1948
Files:
M WEB-INF/lps/schema/lzx.rnc
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/views/LzInputText.lzs
M WEB-INF/lps/lfc/views/LzText.lzs
M lps/components/lz/gridtext.lzx
M lps/includes/source/embednew.js
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070503-
maxcarlson-j.tar