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

Issue 12367043: Support attribute name virtualization in attribute selectors. (Closed)

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

Description

Add a hook to sanitizecss.js to allow rewriting attribute names in attribute selectors, and use said hook from Domado in order to support virtualized attributes (div[foo] becomes div[data-caja-foo], consistently with the rest of our attribute support). @r5548

Patch Set 1 #

Total comments: 13

Patch Set 2 : Support attribute name virtualization in attribute selectors. #

Patch Set 3 : Support attribute name virtualization in attribute selectors. #

Total comments: 1

Patch Set 4 : Support attribute name virtualization in attribute selectors. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -23 lines) Patch
M src/com/google/caja/plugin/domado.js View 1 2 3 2 chunks +32 lines, -1 line 0 comments Download
M src/com/google/caja/plugin/sanitizecss.js View 1 2 3 4 chunks +39 lines, -9 lines 0 comments Download
M tests/com/google/caja/plugin/CssRewriterTest.java View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/css-stylesheet-test.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M tests/com/google/caja/plugin/css-stylesheet-test.js View 1 2 3 2 chunks +23 lines, -10 lines 1 comment Download
M tests/com/google/caja/plugin/css-stylesheet-tests.js View 1 2 3 2 chunks +33 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/third-party-tests.json View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 12
kpreid_google
12 years, 9 months ago (2013-08-02 18:12:44 UTC) #1
kpreid_google
I think this particular design is terrible, because it introduces a new interface which is ...
12 years, 9 months ago (2013-08-02 18:14:33 UTC) #2
MikeSamuel
https://codereview.appspot.com/12367043/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/12367043/diff/1/src/com/google/caja/plugin/domado.js#newcode2104 src/com/google/caja/plugin/domado.js:2104: var dummyValue = rewriteAttribute(tagName, attribName, atype, ''); I'm unclear ...
12 years, 9 months ago (2013-08-05 17:59:37 UTC) #3
kpreid_google
Add a hook to sanitizecss.js to allow rewriting attribute names in attribute selectors, and use ...
12 years, 9 months ago (2013-08-05 19:03:23 UTC) #4
kpreid_google
new snapshot https://codereview.appspot.com/12367043/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/12367043/diff/1/src/com/google/caja/plugin/domado.js#newcode2104 src/com/google/caja/plugin/domado.js:2104: var dummyValue = rewriteAttribute(tagName, attribName, atype, ''); ...
12 years, 9 months ago (2013-08-05 19:03:41 UTC) #5
MikeSamuel
https://codereview.appspot.com/12367043/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/12367043/diff/1/src/com/google/caja/plugin/domado.js#newcode2104 src/com/google/caja/plugin/domado.js:2104: var dummyValue = rewriteAttribute(tagName, attribName, atype, ''); On 2013/08/05 ...
12 years, 8 months ago (2013-08-06 15:31:27 UTC) #6
kpreid_google
Add a hook to sanitizecss.js to allow rewriting attribute names in attribute selectors, and use ...
12 years, 8 months ago (2013-08-07 17:59:23 UTC) #7
kpreid_google
New snapshot: - virtualizeAttrName is now _optional_ for interface compatibility. - funny characters are now ...
12 years, 8 months ago (2013-08-07 18:02:53 UTC) #8
MikeSamuel
LGTM https://codereview.appspot.com/12367043/diff/15001/src/com/google/caja/plugin/sanitizecss.js File src/com/google/caja/plugin/sanitizecss.js (right): https://codereview.appspot.com/12367043/diff/15001/src/com/google/caja/plugin/sanitizecss.js#newcode610 src/com/google/caja/plugin/sanitizecss.js:610: attrs += '[' + rAttr.replace(/[^\w-]/g, '\\$&') + op ...
12 years, 8 months ago (2013-08-07 18:33:52 UTC) #9
kpreid_google
Add a hook to sanitizecss.js to allow rewriting attribute names in attribute selectors, and use ...
12 years, 8 months ago (2013-08-12 19:37:48 UTC) #10
kpreid_google
New snapshot disables the new tests for ES5/3 mode, because changing the cajoler looked more ...
12 years, 8 months ago (2013-08-12 19:39:03 UTC) #11
ihab.awad
12 years, 8 months ago (2013-08-12 21:16:25 UTC) #12
lgtm

https://codereview.appspot.com/12367043/diff/22001/tests/com/google/caja/plug...
File tests/com/google/caja/plugin/css-stylesheet-test.js (right):

https://codereview.appspot.com/12367043/diff/22001/tests/com/google/caja/plug...
tests/com/google/caja/plugin/css-stylesheet-test.js:42: return 'data-caja-' +
attrName;
Ah.
Sign in to reply to this message.

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