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 ''[http://example.com text'']
The parser will fail to match tags on input like ''[http://example.com text'']
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.5.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  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: ---


Attachments

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

Target:
''Something [http://www.cool.com cool'']  -->  <i>Something</i><a
href="http://www.cool.com"..><i>cool></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
''[http://example.com text'']
[http://test.com '''text]'''
''Something [http://test.com in italic'']
''Something [http://test.com mixed''''', even bold]'''
'''''Now [http://test.com both''''']
!! result
<p><a href="http://example.com" class='external text' title="http://example.com"
rel="nofollow"><i>text</i></a>
<a href="http://test.com" class='external text' title="http://test.com"
rel="nofollow"><b>text</b></a>
<i>Something </i><a href="http://test.com" class='external text'
title="http://test.com" rel="nofollow"><i>in italic</i></a>
<i>Something </i><a href="http://test.com" class='external text'
title="http://test.com" rel="nofollow"><i>mixed</i><b>, even bold</b></a>
<i><b>Now </b></i><a href="http://test.com" class='external text'
title="http://test.com" rel="nofollow"><i><b>both</b></i></a>
</p>
!! 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.


Navigation
Links