$href = self::getUploadUrl( $title, $query );
- return '<a href="' . htmlspecialchars( $href ) . '" class="new" title="' .
+ // @todo FIXME: If we don't to escape apostrophes (single quotes) here (using ENT_QUOTES),
+ // then double apostrophes will be parsed as italics somewhere later in the parser,
+ // and break everything horribly
+ return '<a href="' . htmlspecialchars( $href, ENT_QUOTES ) . '" class="new" title="' .
htmlspecialchars( $title->getPrefixedText(), ENT_QUOTES ) . '">' .
$encLabel . '</a>';
}
}
/**
- * Generate a table of contents from a section tree
- * Currently unused.
+ * Generate a table of contents from a section tree.
*
* @param array $tree Return value of ParserOutput::getSections()
* @param string|Language|bool $lang Language for the toc title, defaults to user language