DescriptionConvert 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. #MessagesTotal messages: 6
|