839f2456bb
- fixed (hopefully) all <img> tags - global replace on <br> to <br /> - & in URLs - got the forum module XHTML compliant Julian Sedding
30 lines
596 B
PHP
30 lines
596 B
PHP
<?php
|
|
/**
|
|
* Smarty plugin
|
|
* @package Smarty
|
|
* @subpackage plugins
|
|
*/
|
|
|
|
|
|
/**
|
|
* Smarty regex_replace modifier plugin
|
|
*
|
|
* Type: modifier<br />
|
|
* Name: regex_replace<br />
|
|
* Purpose: regular epxression search/replace
|
|
* @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
|
|
* regex_replace (Smarty online manual)
|
|
* @param string
|
|
* @param string|array
|
|
* @param string|array
|
|
* @return string
|
|
*/
|
|
function smarty_modifier_regex_replace($string, $search, $replace)
|
|
{
|
|
return preg_replace($search, $replace, $string);
|
|
}
|
|
|
|
/* vim: set expandtab: */
|
|
|
|
?>
|