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

Issue 1945041: Allow HTML entities in URIs (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 5 months ago by chirag
Modified:
15 years, 3 months ago
Reviewers:
MikeSamuel
CC:
felix8a, google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

When Caja's ResolveUriStage resolves the source URL in a script node, the "&amp;" gets rewritten to "&amp%3b". I have narrowed the issue down to UriUtil#normalizeQuery (correctly) escaping semicolon in query strings. ResolveUriStage#resolveRelativeUrls should be unescaping HTML entities before calling UriUtil.resolve and escaping HTML entities afterwards. Example: <html><body> <script src="http://example.com/path/?a=1&amp;b=2"> </body></html>

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -1 line) Patch
M src/com/google/caja/plugin/stages/ResolveUriStage.java View 1 chunk +3 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/stages/ResolveUriStageTest.java View 1 chunk +16 lines, -0 lines 1 comment Download

Messages

Total messages: 3
chirag
15 years, 5 months ago (2010-08-10 01:39:13 UTC) #1
chirag
Bump
15 years, 5 months ago (2010-08-16 20:07:14 UTC) #2
MikeSamuel
15 years, 5 months ago (2010-08-16 21:13:13 UTC) #3
http://codereview.appspot.com/1945041/diff/1/2
File tests/com/google/caja/plugin/stages/ResolveUriStageTest.java (right):

http://codereview.appspot.com/1945041/diff/1/2#newcode48
tests/com/google/caja/plugin/stages/ResolveUriStageTest.java:48: job("<a
href=\"http://example.com/bar?a=1&amp;b=2\">foo</a>",
I patched these tests into a clean checkout and they run green without the
changes to ResolveUriStage.

Do you have tests that demonstrate the problem you're having?
Sign in to reply to this message.

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