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

Issue 2200046: Convert script tags with type=os/* to OSML in GadgetHtmlParser (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 4 months ago by chirag
Modified:
15 years, 3 months ago
Reviewers:
johnfargo, Paul Lindner, dev-remailer, Jasvir, gagan.goku
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

Description

Convert script tags with type=os/* to OSML in GadgetHtmlParser. Neko and Caja ignores the xmlns attribute on script elements when parsing html and considers everything inside the script node as text. This is incorrect from the OpenSocial perspective[1]. NekoSimplifiedHtmlParser solves this problem by listening to startEvent and endEvent and converting the script element to the corresponding OSML element. This change will move the script -> osml transformation from to the abstract class GadgetHtmlParser so CajaHtmlParser, VanillaCajaHtmlParser, NekoSimplifiedHtmlParser all correctly parse OSML. This change includes: 1) Convert the <script type="os/*" xmlns=""> node into an equivilant OSML tag in GadgetHtmlparser 2) Move static helper methods in DefaultHtmlSerializer to HtmlSerialization. 3) Use Escaping.escapeXml in HtmlSerialization#printEscapedText Note: The unit tests for CajaHtmlParser fail with this patch, but it'll start working once this patch is applied in Caja: http://codereview.appspot.com/2183044/ [1] - http://opensocial-resources.googlecode.com/svn/spec/1.0/OpenSocial-Templating.xml#rfc.section.10.4.1

Patch Set 1 #

Total comments: 1

Patch Set 2 : Clean up patch. Add more tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -133 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializer.java View 1 4 chunks +2 lines, -42 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java View 1 4 chunks +29 lines, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/HtmlSerialization.java View 1 3 chunks +48 lines, -9 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/SocialDataTags.java View 1 chunk +5 lines, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java View 4 chunks +15 lines, -15 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/VanillaCajaHtmlSerializer.java View 1 1 chunk +1 line, -1 line 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java View 1 4 chunks +0 lines, -58 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializerTest.java View 2 chunks +14 lines, -1 line 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/HtmlSerializationTest.java View 1 chunk +71 lines, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java View 3 chunks +3 lines, -3 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/tags/TemplateBasedTagHandlerTest.java View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6
chirag
15 years, 4 months ago (2010-09-20 22:24:22 UTC) #1
chirag
Code review wasn't remailed by dev-remailer. Resending to dev@shindig.apache.org. On Mon, Sep 20, 2010 at ...
15 years, 4 months ago (2010-09-21 19:05:07 UTC) #2
Paul Lindner
seems fine. Make sure you put @Ignore on the caja tests that fail for now. ...
15 years, 4 months ago (2010-09-21 22:19:14 UTC) #3
gagan.goku
On 2010/09/21 22:19:14, Paul Lindner wrote: > seems fine. Make sure you put @Ignore on ...
15 years, 3 months ago (2010-09-29 03:44:38 UTC) #4
chirag
Clean up patch. Add more tests.
15 years, 3 months ago (2010-09-30 17:32:42 UTC) #5
chirag
15 years, 3 months ago (2010-10-04 19:03:22 UTC) #6
Committed r1004360. Let me know if you see any issues.
On 2010/09/30 17:32:42, chirag wrote:
> Clean up patch. Add more tests.
Sign in to reply to this message.

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