If there are tags preceding the test/os-data script tags parsing fails. It appears that the DOM parsing mangles the singular tags in the block and somehow sees them as an open/close tag combo.
A patch that reproduces the problem follows. I'll do a git bisect later today to see where this was introduced. diff --git a/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-socialmarkup.html b/java/gadgets/src/test/resources/org/apache/shindig/gadgets/p index c7fa769..f38663b 100644 --- a/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-socialmarkup.html +++ b/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-socialmarkup.html @@ -1,3 +1,5 @@ +<link href="moo"></link> + <script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/markup "> <os:ViewerRequest key="viewer"/> </script> @@ -14,4 +16,4 @@ <span>Some content</span> -<div><!-- foo -->bar<!-- baz --></div> \ No newline at end of file +<div><!-- foo -->bar<!-- baz --></div>