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

Issue 1978041: Fix entity name handling in HTML. (Closed)

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

Description

Add code to the HTML parser to fix entities that are missing semicolons. Now, <p>1 &lt 2</p> will be treated as equivalent to <p>1 &lt; </p>. Submitted @4246

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix entity name handling in HTML. #

Patch Set 3 : Fix entity name handling in HTML. #

Patch Set 4 : Fix entity name handling in HTML. #

Total comments: 1

Patch Set 5 : Fix entity name handling in HTML. #

Total comments: 3

Patch Set 6 : Fix entity name handling in HTML. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -8 lines) Patch
M src/com/google/caja/lexer/HtmlEntities.java View 1 2 3 4 5 2 chunks +26 lines, -0 lines 0 comments Download
M src/com/google/caja/parser/html/DomParser.java View 1 2 3 4 5 5 chunks +7 lines, -4 lines 0 comments Download
M src/com/google/caja/parser/html/Html5ElementStack.java View 1 2 3 4 5 4 chunks +53 lines, -1 line 0 comments Download
M src/com/google/caja/parser/html/OpenElementStack.java View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M src/com/google/caja/parser/html/XmlElementStack.java View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M src/com/google/caja/plugin/ExpressionSanitizerCaja.java View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M src/com/google/caja/reporting/MessageType.java View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M tests/com/google/caja/parser/html/DomParserTest.java View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 8
MikeSamuel
15 years, 10 months ago (2010-08-11 22:24:52 UTC) #1
gagan.goku
Nice change :) http://codereview.appspot.com/1978041/diff/1/6 File src/com/google/caja/parser/html/Html5ElementStack.java (right): http://codereview.appspot.com/1978041/diff/1/6#newcode528 src/com/google/caja/parser/html/Html5ElementStack.java:528: + ")(?=$|[^;0-9A-Za-z])" The not followed needs ...
15 years, 10 months ago (2010-08-12 05:03:00 UTC) #2
MikeSamuel
http://codereview.appspot.com/1978041/diff/1/6 File src/com/google/caja/parser/html/Html5ElementStack.java (right): http://codereview.appspot.com/1978041/diff/1/6#newcode528 src/com/google/caja/parser/html/Html5ElementStack.java:528: + ")(?=$|[^;0-9A-Za-z])" On 2010/08/12 05:03:00, gagan.goku wrote: > The ...
15 years, 10 months ago (2010-08-12 19:02:51 UTC) #3
gagan.goku
lgtm. Nice way of testing that entity fixup will not happen inside script tag because ...
15 years, 10 months ago (2010-08-13 00:24:49 UTC) #4
MikeSamuel
On 2010/08/13 00:24:49, gagan.goku wrote: > lgtm. > > Nice way of testing that entity ...
15 years, 10 months ago (2010-08-13 01:25:54 UTC) #5
Jasvir
LGTM++ http://codereview.appspot.com/1978041/diff/10001/11007 File src/com/google/caja/plugin/ExpressionSanitizerCaja.java (right): http://codereview.appspot.com/1978041/diff/10001/11007#newcode64 src/com/google/caja/plugin/ExpressionSanitizerCaja.java:64: result = newES53Rewriter().expand(input); Fine. http://codereview.appspot.com/1978041/diff/10001/11008 File src/com/google/caja/reporting/MessageType.java (right): ...
15 years, 10 months ago (2010-08-16 19:38:32 UTC) #6
MikeSamuel
http://codereview.appspot.com/1978041/diff/10001/11008 File src/com/google/caja/reporting/MessageType.java (right): http://codereview.appspot.com/1978041/diff/10001/11008#newcode45 src/com/google/caja/reporting/MessageType.java:45: "%s: HTML entity missing closing semicolon %s", MessageLevel.LINT), On ...
15 years, 10 months ago (2010-08-16 19:46:25 UTC) #7
gagan.goku
15 years, 10 months ago (2010-08-17 07:31:02 UTC) #8
Thanks for the fix Mike.
Sign in to reply to this message.

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