r68515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68514‎ | r68515 | r68516 >
Date:13:44, 24 June 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Follow up r68491.
Perform doAllQuotes before external links.
Added test case from http://es.wikipedia.org/w/index.php?title=Pablo_Picasso&action=edit&section=5&oldid=38079844
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -1014,6 +1014,15 @@
10151015 !! end
10161016
10171017 !! test
 1018+External link containing double-single-quotes with no space separating the url from text in italics
 1019+!! input
 1020+[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
 1021+!! result
 1022+<p><a href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm" class="external text" rel="nofollow"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="https://www.mediawiki.org/index.php?title=Museo_Picasso_(Par%C3%ADs)&amp;action=edit&amp;redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
 1023+</p>
 1024+!! end
 1025+
 1026+!! test
10181027 URL-encoding in URL functions (single parameter)
10191028 !! input
10201029 {{localurl:Some page|amp=&}}
Index: trunk/phase3/includes/parser/Parser.php
@@ -1073,8 +1073,8 @@
10741074 $text = $df->reformat( $this->mOptions->getDateFormat(), $text );
10751075 }
10761076 $text = $this->replaceInternalLinks( $text );
 1077+ $text = $this->doAllQuotes( $text );
10771078 $text = $this->replaceExternalLinks( $text );
1078 - $text = $this->doAllQuotes( $text );
10791079
10801080 # replaceInternalLinks may sometimes leave behind
10811081 # absolute URLs, which have to be masked to hide them from replaceExternalLinks

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68491Disable pretty italics inside links. Now the italics inside a link alternate ...platonides23:29, 23 June 2010

Comments

#Comment by Platonides (talk | contribs)   21:21, 28 August 2010

This also fixed

[http://example.com ''Foo]
[[Category:Bar]]
[[Baz]]

producing

<a><i>Foo</a><a>Baz</a></i>

(doesn't happen without the category).

Introduced in r68515, extracted from es:Endocrinología.

#Comment by Platonides (talk | contribs)   21:44, 28 August 2010

Introduced in r68491, fixed in r68515.

Status & tagging log