any23-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (ANY23-291) JSON-LD should be looked up in entire HTML document, not just in <head>
Date Fri, 09 Feb 2018 22:16:01 GMT


ASF GitHub Bot commented on ANY23-291:

Github user lewismc commented on the issue:
    1. Look at the call to [extractJSONLDScript](
we use it further down. 
    2. Yes this could probably be cleaned up, it is a bit messy right now.
    3. Right now yes it is correct but I am not sure if it is the intended behavior. When
i originally added the logic, it was what I wrote... if it does not make sense then please
send a PR and we can clean it up.
    For reference on extraction results, please see the following test files [html-embedded-jsonld-extractor-multiple.html
and [html-embedded-jsonld-extractor.html

> JSON-LD should be looked up in entire HTML document, not just in <head>
> -----------------------------------------------------------------------
>                 Key: ANY23-291
>                 URL:
>             Project: Apache Any23
>          Issue Type: Improvement
>          Components: extractors
>    Affects Versions: 1.2
>            Reporter: Thomas Francart
>            Assignee: Hans Brende
>            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

View raw message