Autocomplete widget escapes provided values #103

Open
tonthon opened this Issue Jul 11, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@tonthon
Contributor

tonthon commented Jul 11, 2012

When using widget.AutocompleteWidget, the values provided are escaped.
For example when providing

 [u"John & Son"]

The resulting generated javascript is :

$('#' + oid).autocomplete({source: ["John & Son"] ...

In autocomple_input.pt :

- $('#' + oid).autocomplete({source: ${values}});
+ $('#' + oid).autocomplete({source: ${structure:values}});

Fix the issue.

@tonthon tonthon referenced this issue in Pylons/deformdemo Sep 20, 2012

Merged

Adding test case for deform #103 issue #13

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Sep 21, 2012

Member

Hi, Can you provide a patch for deform itself ?

Member

kiorky commented Sep 21, 2012

Hi, Can you provide a patch for deform itself ?

@mcdonc

This comment has been minimized.

Show comment
Hide comment
@mcdonc

mcdonc Sep 21, 2012

Member

Note to self: what if someone has a ">" in one of their values?

Member

mcdonc commented Sep 21, 2012

Note to self: what if someone has a ">" in one of their values?

@mcdonc

This comment has been minimized.

Show comment
Hide comment
@mcdonc

mcdonc Sep 21, 2012

Member

Possibly need CDATA tag.. and.. who fucking knows. I don't.

Member

mcdonc commented Sep 21, 2012

Possibly need CDATA tag.. and.. who fucking knows. I don't.

@tonthon

This comment has been minimized.

Show comment
Hide comment
@tonthon

tonthon Nov 26, 2013

Contributor

Maybe using bleach to whitelist some html tags could be an option

Contributor

tonthon commented Nov 26, 2013

Maybe using bleach to whitelist some html tags could be an option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment