where a pipe in a url query inside an image caption confused the parser.
Windows file://c|/... urls may be affected. See
http://en.wikipedia.org/wiki/File_URI_scheme#Windows_2
* (Bug 23241) Remove License selector, because it is not used when uploading a
new version.
* (bug 23240) Add ID to namespace selector form on Special:Watchlist
+* The pipe | character in urls is now escaped.
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent
$url = Sanitizer::decodeCharReferences( $url );
# Escape any control characters introduced by the above step
- $url = preg_replace( '/[\][<>"\\x00-\\x20\\x7F]/e', "urlencode('\\0')", $url );
+ $url = preg_replace( '/[\][<>"\\x00-\\x20\\x7F\|]/e', "urlencode('\\0')", $url );
# Validate hostname portion
$matches = array();
!! input
Piped link to URL: [[http://www.example.com|an example URL]]
!! result
-<p>Piped link to URL: [<a href="http://www.example.com|an" class="external text" rel="nofollow">example URL</a>]
+<p>Piped link to URL: [<a href="http://www.example.com%7Can" class="external text" rel="nofollow">example URL</a>]
</p>
!! end
# Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
!! test
Images with the "|" character in the comment
-!! options
-disabled
!! input
[[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
!! result
-<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="An external URL" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=|left|&param2=|x" class="external text" rel="nofollow">external</a> URL</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=%7Cleft%7C&param2=%7Cx" class="external text" rel="nofollow">external</a> URL</div></div></div>
!!end