Last modified: 2011-09-13 03:36:47 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 T32665, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30665 - JS Wikitext parser should allow whitespace between brackets
JS Wikitext parser should allow whitespace between brackets
Status: RESOLVED DUPLICATE of bug 30707
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Neil Kandalgaonkar
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-31 18:03 UTC by Ian Baker
Modified: 2011-09-13 03:36 UTC (History)
3 users (show)

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


Attachments

Description Ian Baker 2011-08-31 18:03:41 UTC
The nifty JS wikitext parser supports the following syntax:

[$1 said foo to $2]

However, it breaks if you write it:
[ $1 said foo to $2]

Translators sometimes put spaces there, unwittingly breaking UW for their language.  I removed the extraneous spaces from the messages file today as a temporary fix (r95892), but we can't expect translators to know what to do, since the PHP parser ignores the whitespace.
Comment 1 Ian Baker 2011-08-31 18:04:46 UTC
Also, any change here should be added to the jQueryMsg extension as well, and we should someday make UW use that extension so we have only one copy of the parser to maintain.
Comment 2 Neil Kandalgaonkar 2011-09-09 18:51:26 UTC
(In reply to comment #0)
> the PHP parser ignores the whitespace.

I just tried it -- that syntax doesn't seem to work in regular wikitext. See:

http://www.mediawiki.org/wiki/User:NeilK/LinkTest

It does, however, work with trailing spaces. Although the concept of "trailing" is somewhat fuzzy given the bidi text here.

Arguably jQueryMsg is more correct because at least it tells you that there is a problem; the PHP parser will just emit the square brackets as is.

Any objection to marking this wontfix?
Comment 3 Neil Kandalgaonkar 2011-09-12 17:32:15 UTC
Resolving this as invalid (see comment #2) since the parser is IMO doing the right thing. The translator used the wrong format.
Comment 4 Ian Baker 2011-09-12 18:01:56 UTC
While this behavior is technically correct, it's not the most robust implementation.  See bug 30874 for details.
Comment 5 Neil Kandalgaonkar 2011-09-13 03:36:47 UTC
Let's just say this is a dupe of the general issues in bug 30707

*** This bug has been marked as a duplicate of bug 30707 ***

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


Navigation
Links