Development

Changeset 8177

You must first sign up to be able to contribute.

Changeset 8177

Show
Ignore:
Timestamp:
04/01/08 10:56:46 (5 months ago)
Author:
nicolas
Message:

Backported r8176 to 1.1 branch (refs #3206)

Files:

Legend:

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

    r7899 r8177  
    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.1/test/unit/helper/TagHelperTest.php

    r7899 r8177  
    1212require_once($_test_dir.'/unit/sfContextMock.class.php'); 
    1313 
    14 $t = new lime_test(20, new lime_output_color()); 
     14$t = new lime_test(21, new lime_output_color()); 
    1515 
    1616$context = sfContext::getInstance(); 
     
    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()