Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_web.py: fix test_GET_DIRECTORY_html_filenode_encoding for Twisted==12.3.0. fixes #1922 #31

Merged
merged 1 commit into from Feb 28, 2013
Merged

test_web.py: fix test_GET_DIRECTORY_html_filenode_encoding for Twisted==12.3.0. fixes #1922 #31

merged 1 commit into from Feb 28, 2013

Conversation

mk-fg
Copy link
Contributor

@mk-fg mk-fg commented Feb 27, 2013

twisted.web.html.escape was used to produce html-encoded string (to then look it up in "value" attribute), but behavior of that function has changed between Twisted 12.2.0 (simple custom implementation) and 12.3.0 (imported from stdlib cgi module).
cgi.escape() requires quote=True parameter to escape double-quote characters.

Fixed by simply using reliable cgi.escape to produce html-escaped string for tests.

Pretty sure I used twisted.web.html.escape because Nevow also used it, but looks like currently it properly quotes attribute values, so guess different func is used for attributes there.

…d==12.3.0. fixes #1922

twisted.web.html.escape was used to produce html-encoded string (to then look
it up in "value" attribute), but behavior of that function has changed between
Twisted 12.2.0 (simple custom implementation) and 12.3.0 (imported from stdlib
cgi module).
@ghost ghost assigned daira Feb 28, 2013
@daira daira merged commit 0f49987 into tahoe-lafs:master Feb 28, 2013
@mk-fg mk-fg deleted the 1922_fix_test_web_test_GET_DIRECTORY_html_filenode_encoding branch February 28, 2013 10:33
meejah pushed a commit to meejah/tahoe-lafs that referenced this pull request Dec 4, 2021
Fix item LFS-01-007 from the Cure53 audit

Fixes: ticket:3821
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants