This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/thirdparty/Smarty/plugins/modifier.sanitize_input.php

15 lines
397 B
PHP
Raw Normal View History

<?php
function smarty_modifier_sanitize_input($string, $esc_type = 'html', $charset='UTF-8')
{
$string = mb_ereg_replace("'","&#039;", $string);
$string = mb_ereg_replace('"',"&quot;", $string);
$string = mb_ereg_replace('<',"&lt;", $string);
$string = mb_ereg_replace('>',"&gt;", $string);
$string = mb_ereg_replace('&lt;br/&gt;',"<br>", $string);
return $string;
}
?>