Changeset 7900
- Timestamp:
- 03/15/08 13:34:54 (6 months ago)
- Files:
-
- branches/1.0/lib/addon/propel/sfPropelDatabaseSchema.class.php (modified) (2 diffs)
- branches/1.0/lib/helper/TagHelper.php (modified) (1 diff)
- branches/1.0/test/unit/helper/TagHelperTest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/addon/propel/sfPropelDatabaseSchema.class.php
r5749 r7900 331 331 if (!in_array($key, array('foreignTable', 'foreignReference', 'onDelete', 'onUpdate', 'index', 'unique'))) 332 332 { 333 $attributes_string .= " $key=\"".htmlspecialchars($this->getCorrectValueFor($key, $value) )."\"";333 $attributes_string .= " $key=\"".htmlspecialchars($this->getCorrectValueFor($key, $value), ENT_QUOTES, sfConfig::get('sf_charset'))."\""; 334 334 } 335 335 } … … 395 395 foreach ($attributes as $key => $value) 396 396 { 397 $attributes_string .= ' '.$key.'="'.htmlspecialchars($this->getCorrectValueFor($key, $value) ).'"';397 $attributes_string .= ' '.$key.'="'.htmlspecialchars($this->getCorrectValueFor($key, $value), ENT_QUOTES, sfConfig::get('sf_charset')).'"'; 398 398 } 399 399 branches/1.0/lib/helper/TagHelper.php
r3336 r7900 72 72 function escape_once($html) 73 73 { 74 return fix_double_escape(htmlspecialchars($html ));74 return fix_double_escape(htmlspecialchars($html, ENT_QUOTES, sfConfig::get('sf_charset'))); 75 75 } 76 76 branches/1.0/test/unit/helper/TagHelperTest.php
r3163 r7900 62 62 // fix_double_escape() 63 63 $t->diag('fix_double_escape()'); 64 $t->is(fix_double_escape(htmlspecialchars(htmlspecialchars('This a > text to "escape"') )), 'This a > text to "escape"', 'fix_double_escape() fixes double escaped strings');64 $t->is(fix_double_escape(htmlspecialchars(htmlspecialchars('This a > text to "escape"'), ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'), 'This a > text to "escape"', 'fix_double_escape() fixes double escaped strings');