Parcourir la source

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@391 a333f486-631f-4898-b8df-5754b55c2be0
dflaven il y a 15 ans
Parent
commit
29221396a1

+ 1 - 1
application/itopwebpage.class.inc.php

@@ -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";

+ 1 - 1
application/nicewebpage.class.inc.php

@@ -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>");
 	}

+ 1 - 1
core/bulkchange.class.inc.php

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