Index: chrome/renderer/resources/extension_process_bindings.js |
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js |
index b109a764d9189b96d047cefeb9cb884cede65db8..221f3fd8413f3f32b1944cea20b1191ce04f9518 100644 |
--- a/chrome/renderer/resources/extension_process_bindings.js |
+++ b/chrome/renderer/resources/extension_process_bindings.js |
@@ -9,9 +9,9 @@ var chromium; |
// We shouldn't be receiving evil JSON unless the browser is owned, but just |
// to be safe, we sanitize it. This regex mania was borrowed from json2, |
// from json.org. |
- if (!/^[\],:{}\s]*$/.test( |
- str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). |
- replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). |
+ if (!/^[\],:{}\s]*$/.test( |
+ str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). |
+ replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). |
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) |
throw new Error("Unexpected characters in incoming JSON response."); |