#18 — setAttribute fails if value contains &
State | Open |
---|---|
Release: | 1.2 (Zope 2.10) |
Area | Process |
Issue type | Bug |
Severity | Medium |
Submitted by | (anonymous) |
Submitted on | 2007-11-01 |
Responsible | Balazs Ree |
Target release: | 1.4 |
Last modified on
2007-11-01
by
Balazs Ree
If you use html query string in setAttribute, the response cannot be parsed and fails with error:
Request failed at url http://127.0.0.1:8080/portal/blah/myAction, rid=0, client_reason="Response parsing error: ResponseParsingError: Unknown server error (invalid KSS response, no error info received)"
The response is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional
.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:kukit="http://www.kukit.org/commands/1.0"><body>
<kukit:commands>
<kukit:command selector="a#demo-link" name="setAttribute"
selectorType="">
<kukit:param name="name">href</kukit:param>
<kukit:param name="value">http://plone.org/search?SearchableText=kss&Title=KSS</kukit:param>
</kukit:command>
<kukit:command selector="a#demo-link" name="setStyle"
selectorType="">
<kukit:param name="name">display</kukit:param>
<kukit:param name="value">inline</kukit:param>
</kukit:command>
</kukit:commands>
</body></html>
Request failed at url http://127.0.0.1:8080/portal/blah/myAction, rid=0, client_reason="Response parsing error: ResponseParsingError: Unknown server error (invalid KSS response, no error info received)"
The response is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional
.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:kukit="http://www.kukit.org/commands/1.0"><body>
<kukit:commands>
<kukit:command selector="a#demo-link" name="setAttribute"
selectorType="">
<kukit:param name="name">href</kukit:param>
<kukit:param name="value">http://plone.org/search?SearchableText=kss&Title=KSS</kukit:param>
</kukit:command>
<kukit:command selector="a#demo-link" name="setStyle"
selectorType="">
<kukit:param name="name">display</kukit:param>
<kukit:param name="value">inline</kukit:param>
</kukit:command>
</kukit:commands>
</body></html>
- Steps to reproduce:
- Create <a id="demo-link" href="#">Link</a> in the template and call the following commands from server action:
href = 'http://plone.org/search?SearchableText=kss&Title=KSS' self.getCommandSet('core').setAttribute('a#demo-link', 'href', href)
Added by
(anonymous)
on
2007-11-01 09:44
It seems POI changed the link. There is no ; after &
Query string is exactly what should be (trying to paste again): SearchableText=kss&Title=KSS
Query string is exactly what should be (trying to paste again): SearchableText=kss&Title=KSS
Added by
Balazs Ree
on
2007-11-01 11:14
Issue state:
unconfirmed → open
Target release:
None → 1.4
Responsible manager:
(UNASSIGNED) → ree
Thank you for your report.