Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: LayoutTests/fast/innerHTML/javascript-url-expected.txt

Issue 1031783002: Escape '&' in javascript URLs for innerHTML/outerHTML (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 Test that innerHTML does not mangle javascript: urls. 1 Test that innerHTML/outerHTML does not mangle javascript: urls.
2 r.innerHTML = r.innerHTML.replace(/&37;3C!--D--&37;3E/g, 123) 2 PASS r.innerHTML is "<a href=\"javascript:test(123)\">link</a>"
3 PASS: r.innerHTML.indexOf('javascript:test(123)') > -1 should be true and is. 3 PASS r.innerHTML is "<a href='javascript:test(\"text<\")'>link</a>"
4 r.firstChild.setAttribute('href', 'javascript:test("text<")') 4 PASS r.innerHTML is "<a href=\"javascript:test('text>')\">link</a>"
5 PASS: r.innerHTML.indexOf('javascript:test("text<")') > -1 should be true and is . 5 PASS r.innerHTML is "<a href=\"javascript:test('text&amp;',&quot;test2&amp;&quot ;)\">link</a>"
6 r.firstChild.setAttribute("href", "javascript:test('text>')") 6 PASS r.firstChild.outerHTML is "<a href=\"javascript:window.location='?x&amp;y'\ ">link</a>"
7 PASS: r.innerHTML.indexOf("javascript:test('text>')") > -1 should be true and is . 7 PASS successfullyParsed is true
8 testString = javascript:test('text&',"test2&") 8
9 r.firstChild.setAttribute("href", testString) 9 TEST COMPLETE
10 PASS: r.innerHTML.indexOf("javascript:test('text&',&quot;test2&&quot;)") > 1 sho uld be true and is.
11 r.firstChild.setAttribute('href', 'http://www.google.fi/search?q=scarlett johans son&meta=&btnG=Google-haku')
12 <a href="http://www.google.fi/search?q=scarlett johansson&amp;meta=&amp;btnG=Goo gle-haku">link</a>
13 link 10 link
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698