User "Krinkle" posted a comment on MediaWiki.r98321.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98321#c23390
Commit summary:

New Extension CreditTab

Comment:

<pre>+  $parser->mOutput->addHeadItem('<link rel="author" type="text/html" 
title="' . wfMsg('credits-tab') . '" href="' . $wgTitle->getLocalURL( 
'action=credits' ) . '" />');
</pre>
There's a slight html escaping issue here with the above. Use 
<code>htmlspecialchars()</code> to escape the value put between 
<code>title=""</code>. Or use <code>Html::element('link', array( 'text' => 
wfMsg( 'credits-tab')))</code> which does it automatically. Or, ideally, use 
the following:
<pre>
$out->addLink( array(
  'rel' => 'author',
  'type' => 'text/html',
  'title' => wfMsg('credits-tab'),
  'href' => $out->getTitle()->getLocalURL( 'action=credits' ),
) );
</pre>


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to