[ https://issues.apache.org/jira/browse/ANY23-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338600#comment-16338600 ]
ASF GitHub Bot commented on ANY23-291: -------------------------------------- GitHub user HansBrende opened a pull request: https://github.com/apache/any23/pull/60 ANY23-291 Allow JSONLD scripts to be located anywhere in document Pretty self explanatory. Simply changed one xpath expression. mvn clean install -> all tests pass. You can merge this pull request into a Git repository by running: $ git pull https://github.com/HansBrende/any23 ANY23-291 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/any23/pull/60.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #60 ---- commit ce4ff34ad31c12dae6d3b0a3df8fcb5b1d6932e9 Author: Hans <firedrake93@...> Date: 2018-01-25T01:58:25Z ANY23-291 Allow JSONLD scripts to be located anywhere in document ---- > JSON-LD should be looked up in entire HTML document, not just in <head> > ----------------------------------------------------------------------- > > Key: ANY23-291 > URL: https://issues.apache.org/jira/browse/ANY23-291 > Project: Apache Any23 > Issue Type: Improvement > Components: extractors > Affects Versions: 1.2 > Reporter: Thomas Francart > Priority: Minor > Fix For: 2.2 > > Attachments: example-embedded-jsonld.html > > > In > org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.extractJSONLDScript(), > I think this line : > List<Node> scriptNodes = DomUtils.findAll(in, "/HTML/HEAD/SCRIPT"); > is too restrictive. scripts containing json-ld can be placed anywhere in the > page, and actually some CMS/Wordpress plugin inserting JSON-LD are generating > their output in the body, not in the head. -- This message was sent by Atlassian JIRA (v7.6.3#76005)