Development

Changeset 8176

You must first sign up to be able to contribute.

Changeset 8176

Show
Ignore:
Timestamp:
04/01/08 10:30:35 (1 year ago)
Author:
nicolas
Message:

Fixes #3026 - Simple quotes are no more escaped by Tag helper escaping function

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/helper/TagHelper.php

    r7900 r8176  
    7272function escape_once($html) 
    7373{ 
    74   return fix_double_escape(htmlspecialchars($html, ENT_QUOTES, sfConfig::get('sf_charset'))); 
     74  return fix_double_escape(htmlspecialchars($html, ENT_COMPAT, sfConfig::get('sf_charset'))); 
    7575} 
    7676 
  • branches/1.0/test/unit/helper/TagHelperTest.php

    r7900 r8176  
    1414sfLoader::loadHelpers(array('Helper', 'Tag')); 
    1515 
    16 $t = new lime_test(20, new lime_output_color()); 
     16$t = new lime_test(21, new lime_output_color()); 
    1717 
    1818$context = new sfContext(); 
     
    5959$t->is(escape_once(escape_once('This a > text to "escape"')), 'This a > text to "escape"', 'escape_once() does not escape an already escaped string'); 
    6060$t->is(escape_once('This a > text to "escape"'), 'This a > text to "escape"', 'escape_once() does not escape an already escaped string'); 
     61$t->is(escape_once("This a > \"text\" to 'escape'"), "This a > "text" to 'escape'", 'escape_once() does not escape simple quotes but escape double quotes'); 
    6162 
    6263// fix_double_escape() 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.