Code review wasn't remailed by dev-remailer. Resending to [email protected].
On Mon, Sep 20, 2010 at 3:24 PM, <[email protected]> wrote: > Reviewers: dev-remailer_shindig.apache.org, johnfargo, Paul Lindner, > > 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 > > > > > Please review this at http://codereview.appspot.com/2200046/ > > Affected files: > java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializer.java > java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java > java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/HtmlSerialization.java > java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/ParseModule.java > java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/VanillaCajaHtmlSerializer.java > java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java > > >
