diff options
author | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 20:08:33 +0000 |
---|---|---|
committer | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 20:08:33 +0000 |
commit | f29acf538815f1d71638ac9db8798998a113955f (patch) | |
tree | 9f06b1775d4b4fa81a81482b7f95640eeb17177d /chrome/browser/dom_ui | |
parent | 7ca2af2c8cb95ea08207b53076f183408e18f2ee (diff) | |
download | chromium_src-f29acf538815f1d71638ac9db8798998a113955f.zip chromium_src-f29acf538815f1d71638ac9db8798998a113955f.tar.gz chromium_src-f29acf538815f1d71638ac9db8798998a113955f.tar.bz2 |
Change some places where we were using javascript: URLs to use
WebFrame::ExecuteJavaScript() instead.
Review URL: http://codereview.chromium.org/8826
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_host.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_host.cc b/chrome/browser/dom_ui/dom_ui_host.cc index 2541e71..d9d0333 100644 --- a/chrome/browser/dom_ui/dom_ui_host.cc +++ b/chrome/browser/dom_ui/dom_ui_host.cc @@ -102,16 +102,6 @@ WebPreferences DOMUIHost::GetWebkitPrefs() { } void DOMUIHost::ExecuteJavascript(const std::wstring& javascript) { - // We're taking a string and making a javascript URL out of it. This means - // that escaping will follow the rules of a URL. Yet, the JSON text may have - // stuff in it that would be interpreted as escaped characters in a URL, but - // we want to preserve them literally. - // - // We just escape all the percents to avoid this, since when this javascript - // URL is interpreted, it will be unescaped. - std::wstring escaped_js(javascript); - ReplaceSubstringsAfterOffset(&escaped_js, 0, L"%", L"%25"); - render_view_host()->ExecuteJavascriptInWebFrame(std::wstring(), - L"javascript:" + escaped_js); + render_view_host()->ExecuteJavascriptInWebFrame(std::wstring(), javascript); } |