Commit a0013b53 authored by Jérome Perrin's avatar Jérome Perrin

generate a link that will be valid xhtml


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24761 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a409a7e6
...@@ -61,7 +61,7 @@ object = object.getDestinationValue()\n ...@@ -61,7 +61,7 @@ object = object.getDestinationValue()\n
if object is None:\n if object is None:\n
url = None\n url = None\n
else:\n else:\n
url = object.absolute_url() + \'/view?selection_index=%s&selection_name=%s&reset=1\' % (index, selection_name)\n url = object.absolute_url() + \'/view?selection_index=%s&selection_name=%s&reset=1\' % (index, selection_name)\n
\n \n
return url\n return url\n
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n <value> <string>from ZTUtils import make_query\n
from Products.PythonScripts.standard import html_quote\n
\n \n
index = context.portal_selections.getSelectionIndexFor(selection_name)\n index = context.portal_selections.getSelectionIndexFor(selection_name)\n
object = brain.getObject()\n object = brain.getObject()\n
...@@ -68,7 +69,7 @@ kw = { \'selection_index\': str(index),\n ...@@ -68,7 +69,7 @@ kw = { \'selection_index\': str(index),\n
\'reset\' : \'1\', \n \'reset\' : \'1\', \n
}\n }\n
\n \n
return \'%s/%s?%s\' % (object.absolute_url(), method, make_query(kw))\n return html_quote(\'%s/%s?%s\' % (object.absolute_url(), method, make_query(kw)))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -111,6 +112,8 @@ return \'%s/%s?%s\' % (object.absolute_url(), method, make_query(kw))\n ...@@ -111,6 +112,8 @@ return \'%s/%s?%s\' % (object.absolute_url(), method, make_query(kw))\n
<string>kwd</string> <string>kwd</string>
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>Products.PythonScripts.standard</string>
<string>html_quote</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>index</string> <string>index</string>
......
817 819
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment