[
https://issues.apache.org/jira/browse/SHINDIG-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876302#action_12876302
]
Jan Luehe commented on SHINDIG-1354:
------------------------------------
Thanks for looking into this, Paul! The simplest example would be a DOM
representation of:
<html><head></head><body></body></html><!-- -->
Upon serialization, the trailing comment will be gone
> org.apache.shindig.gadgets.parse.DefaultHtmlSerializer#serialize drops
> trailing comments
> ----------------------------------------------------------------------------------------
>
> Key: SHINDIG-1354
> URL: https://issues.apache.org/jira/browse/SHINDIG-1354
> Project: Shindig
> Issue Type: Bug
> Components: Java
> Reporter: Jan Luehe
> Priority: Trivial
>
> Summary says it all.
> Suggested diffs:
> Index:
> java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializer.java
> ===================================================================
> ---
> java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializer.java
> (revision 951057)
> +++
> java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializer.java
> (working copy)
> @@ -66,7 +66,10 @@
> break;
> }
> case Node.DOCUMENT_NODE: {
> - serialize(((Document)n).getDocumentElement(), output, xmlMode);
> + NodeList children = ((Document)n).getChildNodes();
> + for (int i = 0; i < children.getLength(); i++) {
> + serialize(children.item(i), output, xmlMode);
> + }
> break;
> }
> case Node.ELEMENT_NODE: {
> Diffs will be submitted for code review.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.