[tahoe-lafs-trac-stream] [tahoe-lafs] #1922: Test of html Encoding After GET Fails

tahoe-lafs trac at tahoe-lafs.org
Wed Feb 27 17:34:16 UTC 2013


#1922: Test of html Encoding After GET Fails
-----------------------------------+---------------------------
     Reporter:  Zancas             |      Owner:  mk.fg
         Type:  defect             |     Status:  new
     Priority:  normal             |  Milestone:  1.10.0
    Component:  code-frontend-web  |    Version:  1.9.2
   Resolution:                     |   Keywords:  wui html test
Launchpad Bug:                     |
-----------------------------------+---------------------------

Comment (by mk.fg):

 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 now in [https://github.com/mk-fg/tahoe-
 lafs/tree/1922_fix_test_web_test_GET_DIRECTORY_html_filenode_encoding
 1922_fix_test_web_test_GET_DIRECTORY_html_filenode_encoding branch] (non-
 official repo), ​github [https://github.com/tahoe-lafs/tahoe-lafs/pull/31
 pull request #31] 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.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1922#comment:9>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list