* Get a namespace value by key
*
* <code>
- * $mw_ns = $wgContLang->getNsText( NS_MEDIAWIKI );
+ * $mw_ns = $lang->getNsText( NS_MEDIAWIKI );
* echo $mw_ns; // prints 'MediaWiki'
* </code>
*
* producing output.
*
* <code>
- * $mw_ns = $wgContLang->getFormattedNsText( NS_MEDIAWIKI_TALK );
+ * $mw_ns = $lang->getFormattedNsText( NS_MEDIAWIKI_TALK );
* echo $mw_ns; // prints 'MediaWiki talk'
* </code>
*
*
* @return string
*/
- function normalize( $s ) {
+ public function normalize( $s ) {
global $wgAllUnicodeFixes;
$s = UtfNormal\Validator::cleanUp( $s );
if ( $wgAllUnicodeFixes ) {
/**
* convert text to different variants of a language.
*
- * @param string $text
- * @return string
+ * @warning Glossary state is maintained between calls. This means
+ * if you pass unescaped text to this method it can cause an XSS
+ * in later calls to this method, even if the later calls have properly
+ * escaped the input. Never feed this method user controlled text that
+ * is not properly escaped!
+ * @param string $text Content that has been already escaped for use in HTML
+ * @return string HTML
*/
public function convert( $text ) {
return $this->mConverter->convert( $text );