Last modified: 2013-07-30 17:32:44 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 T54268, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52268 - Improve nowiki escaping of template arguments by using global context
Improve nowiki escaping of template arguments by using global context
Status: NEW
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-30 10:06 UTC by Chris McKenna
Modified: 2013-07-30 17:32 UTC (History)
1 user (show)

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


Attachments

Description Chris McKenna 2013-07-30 10:06:32 UTC
When an unmatched literal square bracket is used in the title of a reference, Parsoid or VisualEditor encloses it in a nowiki tag.

Example on the live wiki: https://en.wikipedia.org/w/index.php?title=Wikipedia&diff=566045928&oldid=566042453#cite_ref-209 (line 360)
Examples in testing: https://en.wikipedia.org/w/index.php?title=User%3AThryduulf%2Fsandbox&diff=566402676&oldid=566401436

It is possible this is a reappearance of or related to Bug 43067
Comment 1 ssastry 2013-07-30 16:05:25 UTC
Yes, this is a known problem.  There are two different forms of nowiki escaping that goes on in Parsoid.  One is applied to text strings (the common kind that appears around [[foo]] when typed literally).

The one in this bug report is applied to transclusion parameters to prevent literal characters messing up transclusion parse.

Ex: If {{tpl|foo|bar}} is editd to {{tpl|[[foo|bar]]}}, then the "[[foo" and "bar]]" have to be wrapped in nowikis to prevent "[[foo|bar]]" from being parsed as a wikilink.

The current limitation of this second form of nowiki escaping is that it only checks arguments one at a time.  So, it conservatively escapes "[foo" in one argument right now without looking at the global context of all arguments which is why you see the nowiki escapes there.

To be fixed.

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


Navigation
Links