Last modified: 2012-02-22 12:40:28 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 T21302, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19302 - Definition syntax cannot be escaped and is potentially unintended.
Definition syntax cannot be escaped and is potentially unintended.
Status: RESOLVED DUPLICATE of bug 12974
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.14.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-19 21:27 UTC by Chris
Modified: 2012-02-22 12:40 UTC (History)
2 users (show)

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


Attachments

Description Chris 2009-06-19 21:27:20 UTC
I was just writing a template and was surprised when syntax similar to `{{#ifeq:{{{param|}}}|value||; text here}}.  More text here.' was emboldened and given its own paragraph.  I was separating an optional statement off from the main sentence.  Having never used definitions before and therefore clueless why this happened, I took a guess and removd the semicolon.  Aha!  After Googling a bit, I found what the semicolon was for through the bug about the inappropriate <dl/> indentation caused by the colon.  Parser functions like this apparently begin new lines (or at least new matches) implicitly for every pipe, and thus I was seeing behavior I didn't explicitly ask for.

Workaround: Use the HTML entity &#59; (&#58; for colon) instead.

I suggest that:
* the "beginning of line" behavior of parser functions (and presumably templates) be rewritten so only an explicit newline begins a new match; and/or
* escape sequences be designed for the semicolon and colon at the match start, like maybe ;; and :; (additional semicolon for both).
Comment 1 Chris 2009-06-19 21:36:15 UTC
On second thought, that second suggestion would leave other syntax elements such as * and # broken.  Maybe the traditional \ (backslash) would be best.  It could be simply ignored, except for its escaping nature, at a line's start.
Comment 2 Bergi 2011-05-03 14:06:32 UTC
:; would not be a good escape sequence, as it has its own syntactical sense.

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

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


Navigation
Links