- Proper usage of htmlentities: specifiy the target character set !

SVN:trunk[391]
This commit is contained in:
Denis Flaven
2010-05-02 18:52:46 +00:00
parent 9ffb085658
commit cb9331c414
3 changed files with 3 additions and 3 deletions

View File

@@ -335,7 +335,7 @@ EOF
$i = 0;
foreach($m_aTabs as $sTabName => $sTabContent)
{
$sTabs .= "<li><a href=\"#fragment_$i\" class=\"tab\"><span>".htmlentities($sTabName)."</span></a></li>\n";
$sTabs .= "<li><a href=\"#fragment_$i\" class=\"tab\"><span>".htmlentities($sTabName, ENT_QUOTES, 'UTF-8')."</span></a></li>\n";
$i++;
}
$sTabs .= "</ul>\n";

View File

@@ -59,7 +59,7 @@ class NiceWebPage extends WebPage
foreach($aChoices as $sKey => $sValue)
{
$sSelected = ($sKey == $sDefaultValue) ? " SELECTED" : "";
$this->add("<option style=\"width: ".$iWidthPx." px;\" value=\"".htmlspecialchars($sKey)."\"$sSelected>".htmlentities($sValue)."</option>");
$this->add("<option style=\"width: ".$iWidthPx." px;\" value=\"".htmlspecialchars($sKey)."\"$sSelected>".htmlentities($sValue, ENT_QUOTES, 'UTF-8')."</option>");
}
$this->add("</select>");
}

View File

@@ -47,7 +47,7 @@ abstract class CellChangeSpec
}
else
{
return htmlentities($value);
return htmlentities($value, ENT_QUOTES, 'UTF-8');
}
}