Updated Branches:
  refs/heads/master d7785e22d -> 80378f14a

ANY23-115 Empty spans seem to break ANY23


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/80378f14
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/80378f14
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/80378f14

Branch: refs/heads/master
Commit: 80378f14a17c0dc0b9e208683fd9a126883de59e
Parents: d7785e2
Author: lewismc <[email protected]>
Authored: Sun Jul 21 16:38:12 2013 -0700
Committer: lewismc <[email protected]>
Committed: Sun Jul 21 16:38:12 2013 -0700

----------------------------------------------------------------------
 .../org/apache/any23/extractor/microdata/MicrodataParser.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/80378f14/core/src/main/java/org/apache/any23/extractor/microdata/MicrodataParser.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/any23/extractor/microdata/MicrodataParser.java 
b/core/src/main/java/org/apache/any23/extractor/microdata/MicrodataParser.java
index fc7e33c..2b7af59 100644
--- 
a/core/src/main/java/org/apache/any23/extractor/microdata/MicrodataParser.java
+++ 
b/core/src/main/java/org/apache/any23/extractor/microdata/MicrodataParser.java
@@ -60,7 +60,8 @@ public class MicrodataParser {
      * List of tags providing the <code>src</code> property.
      */
     public static final Set<String> SRC_TAGS =  Collections.unmodifiableSet(
-            new HashSet<String>( Arrays.asList("audio", "embed", "iframe", 
"img", "source", "track", "video") )
+            new HashSet<String>( Arrays.asList("audio", "embed", "frame", 
"iframe", "img", 
+              "source", "track", "video", "input", "layer", "script", 
"textarea") )
     );
 
     /**
@@ -215,7 +216,7 @@ public class MicrodataParser {
      */
     public static void getMicrodataAsJSON(Document document, PrintStream ps) {
         final MicrodataParserReport report = getMicrodata(document);
-        final ItemScope[] itemScopes            = 
report.getDetectedItemScopes();
+        final ItemScope[] itemScopes = report.getDetectedItemScopes();
         final MicrodataParserException[] errors = report.getErrors();
 
         ps.append("{ ");
@@ -338,7 +339,7 @@ public class MicrodataParser {
             return new ItemPropValue( getItemScope(node), 
ItemPropValue.Type.Nested );
         }
 
-        final ItemPropValue newItemPropValue = new ItemPropValue( 
node.getTextContent(), ItemPropValue.Type.Plain);
+        final ItemPropValue newItemPropValue = new ItemPropValue( 
node.getTextContent().replaceAll("\\s",""), ItemPropValue.Type.Plain);
         itemPropValues.put(node, newItemPropValue);
         return newItemPropValue;
     }

Reply via email to