소스 검색

- 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 15 년 전
부모
커밋
29221396a1
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      application/itopwebpage.class.inc.php
  2. 1 1
      application/nicewebpage.class.inc.php
  3. 1 1
      core/bulkchange.class.inc.php

+ 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');
 		}
 	}