any23-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HansBrende <...@git.apache.org>
Subject [GitHub] any23 pull request #59: ANY23-326 fixed rdfa issue with unclosed input & met...
Date Wed, 24 Jan 2018 21:28:32 GMT
Github user HansBrende commented on a diff in the pull request:

    https://github.com/apache/any23/pull/59#discussion_r163683520
  
    --- Diff: core/src/main/java/org/apache/any23/extractor/rdf/BaseRDFExtractor.java ---
    @@ -105,7 +109,24 @@ public void run(
                 parser.getParserConfig().addNonFatalError(BasicParserSettings.NORMALIZE_DATATYPE_VALUES);
                 //ByteBuffer seems to represent incorrect content. Need to make sure it is
the content
                 //of the <script> node and not anything else!
    -            parser.parse(in, extractionContext.getDocumentIRI().stringValue());
    +            RDFFormat format = parser.getRDFFormat();
    +            String iri = extractionContext.getDocumentIRI().stringValue();
    +
    +            if (format.hasFileExtension("xhtml")) {
    --- End diff --
    
    @lewismc I can also do the check via pattern matching on MIME types instead of file extensions,
if you'd prefer. This way was just the easiest & quickest, and either way we'd get the
same results.


---

Mime
View raw message