Development

Changeset 7548

You must first sign up to be able to contribute.

Changeset 7548

Show
Ignore:
Timestamp:
02/19/08 20:28:35 (9 months ago)
Author:
dwhittle
Message:

dwhittle: fixed coding style + change encoding to be htmlentities

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dwhittle/1.1/lib/debug/sfWebDebug.class.php

    r7544 r7548  
    8989 
    9090    // escape HTML 
    91     $logLine = htmlspecialchars($logLine, ENT_QUOTES, sfConfig::get('sf_charset')); 
     91    $logLine = htmlentities($logLine, ENT_QUOTES, sfConfig::get('sf_charset')); 
    9292 
    9393    // replace constants value with constant name 
     
    298298    $features = array( 
    299299      // core features 
    300       'cache'                                     => sfConfig::get('sf_cache')               ? 'on' : 'off', 
    301       'i18n'                                      => sfConfig::get('sf_i18n')                ? 'on' : 'off', 
    302       'security'                                  => sfConfig::get('sf_use_security')        ? 'on' : 'off', 
    303       'escaping'                                  => sfConfig::get('sf_escaping_strategy')   ? 'on' : 'off', 
    304       'database'                                  => sfConfig::get('sf_use_database')        ? 'on' : 'off', 
    305       'compression'                               => sfConfig::get('sf_compressed')          ? 'on' : 'off', 
    306       'logging'                                   => sfConfig::get('sf_logging_enabled')     ? 'on' : 'off', 
    307       'debug'                                     => sfConfig::get('sf_debug')               ? 'on' : 'off', 
     300      'cache'         => sfConfig::get('sf_cache')               ? 'on' : 'off', 
     301      'i18n'          => sfConfig::get('sf_i18n')                ? 'on' : 'off', 
     302      'security'      => sfConfig::get('sf_use_security')        ? 'on' : 'off', 
     303      'escaping'      => sfConfig::get('sf_escaping_strategy')   ? 'on' : 'off', 
     304      'database'      => sfConfig::get('sf_use_database')        ? 'on' : 'off', 
     305      'compression'   => sfConfig::get('sf_compressed')          ? 'on' : 'off', 
     306      'logging'       => sfConfig::get('sf_logging_enabled')     ? 'on' : 'off', 
     307      'debug'         => sfConfig::get('sf_debug')               ? 'on' : 'off', 
    308308    ); 
    309309 
     
    353353    $content = ' 
    354354    <h2>'.$id.' <a href="#" onclick="sfWebDebugToggle(\'sfWebDebug'.$id.'\'); return false;">'.image_tag(sfConfig::get('sf_web_debug_web_dir').'/images/toggle.gif').'</a></h2> 
    355     <div id="sfWebDebug'.$id.'" style="display: none"><pre>'.htmlspecialchars(@sfYaml::dump($values), ENT_QUOTES, sfConfig::get('sf_charset')).'</pre></div> 
     355    <div id="sfWebDebug'.$id.'" style="display: none"><pre>'.htmlentities(@sfYaml::dump($values), ENT_QUOTES, sfConfig::get('sf_charset')).'</pre></div> 
    356356    '; 
    357357 
     
    390390      <div style="height: 16px; padding: 2px"><a href="#" onclick="sfWebDebugToggle(\''.$id.'\'); return false;"><strong>cache information</strong></a>&nbsp;<a href="#" onclick="sfWebDebugToggle(\'sub_main_'.$id.'\'); document.getElementById(\'main_'.$id.'\').style.border = \'none\'; return false;">'.image_tag(sfConfig::get('sf_web_debug_web_dir').'/images/close.png').'</a>&nbsp;</div> 
    391391        <div style="padding: 2px; display: none" id="'.$id.'"> 
    392         [uri]&nbsp;'.htmlspecialchars($internalUri, ENT_QUOTES, sfConfig::get('sf_charset')).'<br /> 
     392        [uri]&nbsp;'.htmlentities($internalUri, ENT_QUOTES, sfConfig::get('sf_charset')).'<br /> 
    393393        [life&nbsp;time]&nbsp;'.$cache->getLifeTime($internalUri).'&nbsp;seconds<br /> 
    394394        [last&nbsp;modified]&nbsp;'.(time() - $lastModified).'&nbsp;seconds<br />