https://bugzilla.wikimedia.org/show_bug.cgi?id=23946

           Summary: JSON output from #ask does not escape "
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Here's an example:

                {
                        "label": "Follow",

                        "shortdesc": "Implements "tail -f" functionality",

                        "uri" : "http://localhost/wiki/index.php?title=Follow";,
                }

This is output from {{#ask[[someprop::someval]] | ?shortdesc=}}.  "Shortdesc"
is of type String, so it should be expected to possibly contain quotes, as
above.  However, this short circuits the decoding of the JSON -- eg, php's own
decode_json will fail here and return NULL.  Parsing the reply to escape the
quotes -- so: "Implements \"tail -f\" functionality" corrects the issue and
decode_json works properly. Obviously, SMW should not be providing bad JSON
data!

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to