# HG changeset patch # User paulb # Date 1132851185 0 # Node ID 6eb90658c00a0304257e2e15ff75d576999d735a # Parent b2fe5c18b0619d5cd25a11791f09668b63038d7e [project @ 2005-11-24 16:53:05 by paulb] Fixed the url-encode function to include # character translation. diff -r b2fe5c18b061 -r 6eb90658c00a XSLForms/Output.py --- a/XSLForms/Output.py Sun Nov 20 01:33:10 2005 +0000 +++ b/XSLForms/Output.py Thu Nov 24 16:53:05 2005 +0000 @@ -323,7 +323,8 @@ Provides a "URL encoded" string created from the merged textual contents of the given 'nodes', with the encoded character values representing characters - in the optional 'charset' (UTF-8 if not specified). + in the optional 'charset' (UTF-8 if not specified). Note that / and # + characters are replaced with their "URL encoded" character values. template:url-encode(./text(), 'iso-8859-1') """ @@ -331,7 +332,7 @@ l = [] for node in nodes: s = libxml2dom.Node(node).nodeValue - l.append(urllib.quote(s.encode("utf-8")).replace("/", "%2F")) + l.append(urllib.quote(s.encode("utf-8")).replace("/", "%2F").replace("#", "%23")) output = "".join(l) return output