Author: hightowe
Description:
$wgOut->setPageTitle($new_title) appears to have an entity escaping bug. I can demonstrate the bug by calling it this way: $wgOut->setPageTitle("US&S"). Doing that makes my <title> tag correct, but does _not_ change "US&S" to "US&S" in the HTML of the rendered page.
Calling it this way: $wgOut->setPageTitle(htmlspecialchars("US&S")) gets the HTML correct, but then the <title> tag will hold "US&amp;S" ... obviously wrong.
I can do this, and get the correct results:
$new_title="US&S"; $wgOut->setPageTitle(htmlspecialchars($new_title)); $wgOut->setHTMLTitle($new_title);
I see in mediawiki/includes/OutputPage.php that setPageTitle() calls setHTMLTitle(), but it must do so wrongly in some way.
Version: 1.12.x
Severity: normal