summaryrefslogtreecommitdiff
path: root/addons/web/controllers
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-02-21 13:03:34 +0100
committerThibault Delavallée <tde@openerp.com>2013-02-21 13:03:34 +0100
commit28e97400d4d7300513b63c2e4ce871fcd0db620a (patch)
tree60ca368149b3569a3cca78c8b44794d410c1ac9a /addons/web/controllers
parent8da860b5bac9b62859cbd8507e0c2e6897d9a99f (diff)
parent5e09c5c36134d81b12ab075cf7fff9ba4a207997 (diff)
[FWD] [MERGE] Foward port of web-7.0 until rev 3771.
bzr revid: tde@openerp.com-20130221120334-l9rqz3g28nb655yu
Diffstat (limited to 'addons/web/controllers')
-rw-r--r--addons/web/controllers/main.py5
-rw-r--r--addons/web/controllers/testing.py10
2 files changed, 8 insertions, 7 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index e23246d7288..394bbe657d9 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -13,6 +13,7 @@ import os
import re
import simplejson
import time
+import urllib
import urllib2
import zlib
from xml.etree import ElementTree
@@ -293,9 +294,9 @@ def manifest_list(req, extension, mods=None, db=None):
if not req.debug:
path = '/web/webclient/' + extension
if mods is not None:
- path += '?mods=' + mods
+ path += '?' + urllib.urlencode({'mods': mods})
elif db:
- path += '?db=' + db
+ path += '?' + urllib.urlencode({'db': db})
return [path]
files = manifest_glob(req, extension, addons=mods, db=db)
i_am_diabetic = req.httprequest.environ["QUERY_STRING"].count("no_sugar") >= 1 or \
diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py
index 5692139f002..b6327bf4622 100644
--- a/addons/web/controllers/testing.py
+++ b/addons/web/controllers/testing.py
@@ -32,12 +32,12 @@ NOMODULE_TEMPLATE = Template(u"""<!DOCTYPE html>
</form>
</body>
</html>
-""")
+""", default_filters=['h'])
NOTFOUND = Template(u"""
<p>Unable to find the module [${module}], please check that the module
name is correct and the module is on OpenERP's path.</p>
<a href="/web/tests">&lt;&lt; Back to tests</a>
-""")
+""", default_filters=['h'])
TESTING = Template(u"""<!DOCTYPE html>
<html style="height: 100%">
<%def name="to_path(module, p)">/${module}/${p}</%def>
@@ -51,9 +51,9 @@ TESTING = Template(u"""<!DOCTYPE html>
<script src="/web/static/lib/qunit/qunit.js"></script>
<script type="text/javascript">
- var oe_db_info = ${db_info};
+ var oe_db_info = ${db_info | n};
// List of modules, each module is preceded by its dependencies
- var oe_all_dependencies = ${dependencies};
+ var oe_all_dependencies = ${dependencies | n};
QUnit.config.testTimeout = 5 * 60 * 1000;
</script>
</head>
@@ -83,7 +83,7 @@ TESTING = Template(u"""<!DOCTYPE html>
% endif
% endfor
</html>
-""")
+""", default_filters=['h'])
class TestRunnerController(http.Controller):
_cp_path = '/web/tests'