Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(209)

Issue 9981045: Fix syntax and escaping of window.location properties. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by kpreid2
Modified:
12 years, 9 months ago
Reviewers:
ihab.awad
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fixes to window.location per MDN and empirical testing w/ Chrome: * window.location.{pathname,search,hash} are in escaped form. * window.location.host correct when no port number is present. * window.location.pathname is never empty, but at least '/'. * window.location.{search,hash} include the ? or #. * Fixed cases where 'nosuchhost.invalid' placeholder values occur even though there is a proper value, which happens to be the empty string. Supporting changes: * Move testLocation from test-domado-dom-guest to test-domado-global and run it on several different URLs. * Refactor test-domado-global to introduce registerGlobalTest which can handle more cases than registerGuestTest. @r5441

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix syntax and escaping of window.location properties. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -113 lines) Patch
M src/com/google/caja/plugin/domado.js View 1 2 chunks +11 lines, -6 lines 0 comments Download
M tests/com/google/caja/plugin/es53-test-domado-dom-guest.html View 1 1 chunk +0 lines, -52 lines 0 comments Download
M tests/com/google/caja/plugin/es53-test-domado-global.js View 1 4 chunks +87 lines, -55 lines 0 comments Download
A tests/com/google/caja/plugin/es53-test-domado-global-location.js View 1 1 chunk +56 lines, -0 lines 0 comments Download

Messages

Total messages: 4
kpreid2
12 years, 9 months ago (2013-06-05 21:00:16 UTC) #1
ihab.awad
lgtm https://codereview.appspot.com/9981045/diff/1/tests/com/google/caja/plugin/es53-test-domado-global-location.js File tests/com/google/caja/plugin/es53-test-domado-global-location.js (right): https://codereview.appspot.com/9981045/diff/1/tests/com/google/caja/plugin/es53-test-domado-global-location.js#newcode22 tests/com/google/caja/plugin/es53-test-domado-global-location.js:22: // tests for a specific url (that we're ...
12 years, 9 months ago (2013-06-07 20:12:03 UTC) #2
kpreid2
Fixes to window.location per MDN and empirical testing w/ Chrome: * window.location.{pathname,search,hash} are in escaped ...
12 years, 9 months ago (2013-06-07 20:19:34 UTC) #3
kpreid2
12 years, 9 months ago (2013-06-07 20:20:03 UTC) #4
https://codereview.appspot.com/9981045/diff/1/tests/com/google/caja/plugin/es...
File tests/com/google/caja/plugin/es53-test-domado-global-location.js (right):

https://codereview.appspot.com/9981045/diff/1/tests/com/google/caja/plugin/es...
tests/com/google/caja/plugin/es53-test-domado-global-location.js:22: // tests
for a specific url (that we're not being consistent but incorrect)
On 2013/06/07 20:12:03, ihab.awad wrote:
> I had trouble reading the parenthesized comment, perhaps recast? You mean:
>   (that we're not being (consistent but incorrect))
> but it was easy for me to misread:
>   (that we're (not being consistent) but [are] (incorrect))

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b