Source for file strip_tags.php

Documentation is available at strip_tags.php

  1. <?php
  2.  
  3. /**
  4.  * Removes all html tags
  5.  * <pre>
  6.  *  * value : the string to process
  7.  *  * addspace : if true, a space is added in place of every removed tag
  8.  * </pre>
  9.  * This software is provided 'as-is', without any express or implied warranty.
  10.  * In no event will the authors be held liable for any damages arising from the use of this software.
  11.  *
  12.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  13.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  14.  * @license    http://dwoo.org/LICENSE   Modified BSD License
  15.  * @link       http://dwoo.org/
  16.  * @version    1.0.0
  17.  * @date       2008-10-23
  18.  * @package    Dwoo
  19.  */
  20. function Dwoo_Plugin_strip_tags_compile(Dwoo_Compiler $compiler$value$addspace=true)
  21. {
  22.     if ($addspace==='true'{
  23.         return "preg_replace('#<[^>]*>#', ' ', $value)";
  24.     else {
  25.         return "strip_tags($value)";
  26.     }
  27. }

Documentation generated on Sun, 07 Feb 2010 17:53:58 +0000 by phpDocumentor 1.4.0