Development

Changeset 6723

You must first sign up to be able to contribute.

Changeset 6723

Show
Ignore:
Timestamp:
12/26/07 22:23:48 (2 years ago)
Author:
fabien
Message:

added functional tests for view escaping

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/view/sfEscapedViewParameterHolder.class.php

    r6176 r6723  
    6868    $attributes = array(); 
    6969 
    70     $escapedData = sfOutputEscaper::escape($this->getEscapingMethod(), $this->getAll()); 
    71  
    7270    switch ($this->getEscaping()) 
    7371    { 
     72      case 'on': 
     73        $escapedData = sfOutputEscaper::escape($this->getEscapingMethod(), $this->getAll()); 
     74        $attributes['sf_data'] = $escapedData; 
     75        break; 
    7476      case 'bc': 
     77        $escapedData = sfOutputEscaper::escape($this->getEscapingMethod(), $this->getAll()); 
    7578        $attributes = $this->getAll(); 
     79        $attributes['sf_data'] = $escapedData; 
    7680        break; 
    7781      case 'both': 
     82        $escapedData = sfOutputEscaper::escape($this->getEscapingMethod(), $this->getAll()); 
    7883        foreach ($escapedData as $key => $value) 
    7984        { 
    8085          $attributes[$key] = $value; 
    8186        } 
     87        $attributes['sf_data'] = $escapedData; 
     88        break; 
     89      case 'off': 
     90        $attributes = $this->getAll(); 
    8291        break; 
    8392    } 
    84  
    85     $attributes['sf_data'] = $escapedData; 
    8693 
    8794    return $attributes; 

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.