Last modified: 2010-05-15 15:37:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 2702 - The parser will fail to match tags on input like ''[ text'']
The parser will fail to match tags on input like ''[ text'']
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
  Show dependency treegraph
Reported: 2005-07-04 23:29 UTC by Ævar Arnfjörð Bjarmason
Modified: 2010-05-15 15:37 UTC (History)
0 users

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


Description Ævar Arnfjörð Bjarmason 2005-07-04 23:29:16 UTC
The parser will fail to match tags on input like ''[ text''],
it will produce output like (approximation) <i><a
href="">text</i></a> instead of <i><a href="">text</a></i>
like it should.

There's a parsertest for this bug titled "Mismatched <i> and <a> tags are invalid"
Comment 1 Gabriel Wicke 2006-03-18 10:36:59 UTC
With the current multi-pass parser it's difficult to fix nesting problems like
these. No nesting state is preserved between doAllQuotes() and
replaceExternalLinks(). Nevertheless, i'm working on another preg_replace hack
that fixes most of these cases.

''Something [ cool'']  -->  <i>Something</i><a
Comment 2 Gabriel Wicke 2006-03-18 12:27:03 UTC
I've got this test passing now:

!! test
Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
!! input
''[ text'']
[ '''text]'''
''Something [ in italic'']
''Something [ mixed''''', even bold]'''
'''''Now [ both''''']
!! result
<p><a href="" class='external text' title=""
<a href="" class='external text' title=""
<i>Something </i><a href="" class='external text'
title="" rel="nofollow"><i>in italic</i></a>
<i>Something </i><a href="" class='external text'
title="" rel="nofollow"><i>mixed</i><b>, even bold</b></a>
<i><b>Now </b></i><a href="" class='external text'
title="" rel="nofollow"><i><b>both</b></i></a>
!! end
Comment 3 Gabriel Wicke 2006-03-24 17:38:08 UTC
Committed (code is active if tidy is disabled), closing therefore.

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