Commit eb3d7fa7 authored by ojan@chromium.org's avatar ojan@chromium.org

Fix jsonp callback code to add the callback if json content

is not jsonp.
* TestResultServer/handlers/testfilehandler.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f791577
2011-11-19 Ojan Vafai <ojan@chromium.org>
Fix jsonp callback code to add the callback if json content
is not jsonp.
* TestResultServer/handlers/testfilehandler.py:
2011-11-19 Alice Boxhall <aboxhall@chromium.org>
Modify dashboard_base.js to optionally accept version 4 results json.
......@@ -52,7 +52,10 @@ PARAM_CALLBACK = "callback"
def _replace_jsonp_callback(json, callback_name):
if callback_name and re.search(r"^[A-Za-z0-9_]+$", callback_name):
json = re.sub(r"^[A-Za-z0-9_]+[(]", callback_name + "(", json)
if re.search(r"^[A-Za-z0-9_]+[(]", json):
return re.sub(r"^[A-Za-z0-9_]+[(]", callback_name + "(", json)
return callback_name + "(" + json + ")"
return json
......
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