Last modified: 2014-02-20 20:00:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63659, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61659 - VisualEditor: modules/syntaxhighlight/rules/mysql.json has unescaped double quotes in a double quoted string
VisualEditor: modules/syntaxhighlight/rules/mysql.json has unescaped double q...
Status: VERIFIED FIXED
Product: VisualEditor
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: James Forrester
:
Depends on:
Blocks: 58279
  Show dependency treegraph
 
Reported: 2014-02-20 14:29 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-02-20 20:00 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2014-02-20 14:29:55 UTC
The file modules/syntaxhighlight/rules/mysql.json has at least one double quoted string containing unescaped double quotes. I.e something like:

{
 "match" : """
}

That cause PHP json_decode() to choke with a syntax error.  I wrote a json linter to lint json files in Jenkins.  You can try it using integration/jenkins.git and running bin/json-lint.php

 ./modules/syntaxhighlight/rules/mysql.json: Syntax error
Comment 1 Gerrit Notification Bot 2014-02-20 19:18:15 UTC
Change 114518 had a related patch set uploaded by Jforrester:
Fix broken JSON in modules/syntaxhighlight/rules/mysql.json

https://gerrit.wikimedia.org/r/114518
Comment 2 James Forrester 2014-02-20 19:19:24 UTC
(In reply to Antoine "hashar" Musso from comment #0)
> The file modules/syntaxhighlight/rules/mysql.json has at least one double
> quoted string containing unescaped double quotes. I.e something like:
> 
> {
>  "match" : """
> }
> 
> That cause PHP json_decode() to choke with a syntax error.  I wrote a json
> linter to lint json files in Jenkins.  You can try it using
> integration/jenkins.git and running bin/json-lint.php
> 
>  ./modules/syntaxhighlight/rules/mysql.json: Syntax error

It's in a file that's not currently used (the code needs some work), but I've fixed it.
Comment 3 Gerrit Notification Bot 2014-02-20 19:43:03 UTC
Change 114518 merged by jenkins-bot:
Fix broken JSON in modules/syntaxhighlight/rules/mysql.json

https://gerrit.wikimedia.org/r/114518
Comment 4 Antoine "hashar" Musso (WMF) 2014-02-20 20:00:36 UTC
The PHP json_decode() no more reports any error. Thank you!
Comment 5 Antoine "hashar" Musso (WMF) 2014-02-20 20:00:51 UTC
hashar@gallium:~/extensions$ /srv/deployment/integration/slave-scripts/bin/json-lint.php VisualEditor/; echo $?
0
hashar@gallium:~/extensions$

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links