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

Issue 13258043: fix Closure Compiler issues in html-css-sanitizer (Closed)

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

Description

This fixes the css sanitizer to be Closure friendly and replaces the minified version with a closured version. This reduces the size from 76k to 52k uncompressed, 24k to 16k compressed. The fix is all about how Closure treats a.foo differently from a['foo']. These particular foos are external linkage names, so I changed the to a['foo'] so Closure won't rename them. The change in RhinoTestBed is because the Closured js will emit code like if (condition) /foo/.test(bar) and our java JS parser barfs on the regexp in that position. The barf is a known problem, it's complicated to fix, but it turns out we don't really need to parse js in RhinoTestBed, so that's what the change is.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -52 lines) Patch
M build.xml View 3 chunks +2 lines, -20 lines 0 comments Download
M src/com/google/caja/plugin/cssparser.js View 7 chunks +14 lines, -14 lines 0 comments Download
M src/com/google/caja/plugin/html-sanitizer.js View 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/plugin/sanitizecss.js View 8 chunks +15 lines, -14 lines 0 comments Download
M tests/com/google/caja/parser/js/ParserTest.java View 1 chunk +1 line, -0 lines 0 comments Download
M tests/com/google/caja/util/RhinoTestBed.java View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3
felix8a
12 years, 6 months ago (2013-08-27 02:57:14 UTC) #1
ihab.awad
lgtm
12 years, 6 months ago (2013-08-28 15:09:19 UTC) #2
felix8a
12 years, 6 months ago (2013-08-28 18:05:14 UTC) #3
@r5583
Sign in to reply to this message.

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