[ 
https://issues.apache.org/jira/browse/ANY23-328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360049#comment-16360049
 ] 

ASF GitHub Bot commented on ANY23-328:
--------------------------------------

GitHub user HansBrende opened a pull request:

    https://github.com/apache/any23/pull/65

    ANY23-328 Strip comments from json-ld to make parsing more lenient

    I stripped single-line and multi-line comments from json-ld content, as 
well as CDATA markers.
    
    Also added a test case.
    
    `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-328

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/any23/pull/65.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 #65
    
----
commit c3ebe3f17864c0afabdffc4585f68f9d2ce27bef
Author: Hans <firedrake93@...>
Date:   2018-02-11T18:11:32Z

    ANY23-328 Strip comments from json-ld content to make parsing more lenient

----


> Problem parsing json-ld content surrounded by comments
> ------------------------------------------------------
>
>                 Key: ANY23-328
>                 URL: https://issues.apache.org/jira/browse/ANY23-328
>             Project: Apache Any23
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1
>            Reporter: Hans Brende
>            Assignee: Hans Brende
>            Priority: Major
>             Fix For: 2.3
>
>
> Sometimes in json-ld script blocks (e.g., on https://www.guthriegreen.com), 
> you will see
> /&ast;<![CDATA[&ast;/
> ...json-ld content...
> /&ast;]]>&ast;/
> or 
> //<![CDATA[
> ...json-ld content...
> //]]>
>  
> Currently we are stripping CDATA markers, but we are not stripping leading & 
> trailing comments, which will cause json-ld parsing to fail. This may be 
> related to issue #17. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to