Source for file safe.php

Documentation is available at safe.php

  1. <?php
  2.  
  3. /**
  4.  * Marks the variable as safe and removes the auto-escape function, only useful if you turned auto-escaping on
  5.  * <pre>
  6.  *  * var : the variable to pass through untouched
  7.  * </pre>
  8.  * This software is provided 'as-is', without any express or implied warranty.
  9.  * In no event will the authors be held liable for any damages arising from the use of this software.
  10.  *
  11.  * This file is released under the LGPL
  12.  * "GNU Lesser General Public License"
  13.  * More information can be found here:
  14.  * {@link http://www.gnu.org/copyleft/lesser.html}
  15.  *
  16.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  17.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  18.  * @license    http://www.gnu.org/copyleft/lesser.html  GNU Lesser General Public License
  19.  * @link       http://dwoo.org/
  20.  * @version    0.9.1
  21.  * @date       2008-05-30
  22.  * @package    Dwoo
  23.  */
  24. function Dwoo_Plugin_safe_compile(Dwoo_Compiler $compiler$var)
  25. {
  26.     return preg_replace('#\(is_string\(\$tmp=(.+?)\) \? htmlspecialchars\(\$tmp, ENT_QUOTES, \$this->charset\) : \$tmp\)#''$1'$var);
  27. }

Documentation generated on Sun, 07 Sep 2008 23:57:57 +0200 by phpDocumentor 1.4.0