* (bug 13835) Fix rendering of {{filepath:Wiki.png|nowiki}}
* (bug 16772) Special:Upload now correctly rejects files with spaces in the
file extension (e.g. Foo. jpg).
-* Ensure that all HTML id's generated for headers begin with a letter.
+* Ensure that all HTML id's begin with a letter as required by XHTML standard
=== API changes in 1.14 ===
}
if ( $attribute === 'id' )
- $value = Sanitizer::escapeId( $value );
+ $value = Sanitizer::escapeId( $value, Sanitizer::NONE );
// If this attribute was previously set, override it.
// Output should only have one attribute of each name.
* Escape a text fragment, say from a link, for a URL
*/
static function escapeFragmentForURL( $fragment ) {
- $fragment = str_replace( ' ', '_', $fragment );
- $fragment = urlencode( Sanitizer::decodeCharReferences( $fragment ) );
- $replaceArray = array(
- '%3A' => ':',
- '%' => '.'
- );
- return strtr( $fragment, $replaceArray );
+ return Sanitizer::escapeId( $fragment, Sanitizer::NONE );
}
#----------------------------------------------------------------------------
!! input
[[%23%3c]][[%23%3e]]
!! result
-<p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
+<p><a href="#x.3C" title="">#<</a><a href="#x.3E" title="">#></a>
</p>
!! end
!! input
<span id="æ: v">byte</span>[[#æ: v|backlink]]
!! result
-<p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
+<p><span id="x.C3.A6:_v">byte</span><a href="#x.C3.A6:_v" title="">backlink</a>
</p>
!! end