Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1970 closed defect (fixed)

ValidationTextbox eats all text after quote

Reported by: mconlon@… Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description

There is some sort of bug in the Dojo widget parser which mangles form fields. To see this in action, try the simple changes to demos/widget/Form.html posted by "Klang":

<input type="text" name="name" class="medium" value="xxxx&#039;yyyy"
    dojoType="ValidationTextBox"
    required="true" 
    ucfirst="true"
/>

If the value string contains multiple quotes, the string is hacked up into a bunch of DOM nodes with no content.

Martin

Attachments (2)

DomWidget.diff (431 bytes) - added by mconlon@… 13 years ago.
SVN diff which corrects the problem with single quotes (but still not with double quotes)
DomWidget.2.diff (432 bytes) - added by mconlon@… 13 years ago.
SVN diff which corrects the problem.... I think.…

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by mconlon@…

Attachment: DomWidget.diff added

SVN diff which corrects the problem with single quotes (but still not with double quotes)

Changed 13 years ago by mconlon@…

Attachment: DomWidget.2.diff added

SVN diff which corrects the problem.... I think....

comment:1 Changed 13 years ago by bill

Component: ParserWidgets
Owner: changed from dylan to bill
Status: newassigned

The problem isn't in the parser, or in DomWidget?. The value is read in fine, and ValidationTextBox?.value has the correct value. The problem is that when said value is substituted into the template:

	<input dojoAttachPoint='textbox' ...
		value='${this.value}' ...>

... we need to substitute the escaped value into the template, or use a different mechanism to set the value (just setting inputNode.value = foo.value).

comment:2 Changed 13 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [6676]) Fixes #1970

comment:3 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.