Adding nl2br in Sanitize::html

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3430 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
dho 2006-08-25 12:45:07 +00:00
parent 554b4ceb42
commit feb526a9ba

View file

@ -85,6 +85,7 @@ class Sanitize{
$patterns = array("/\&/", "/%/", "/</", "/>/", '/"/', "/'/", "/\(/", "/\)/", "/\+/", "/-/");
$replacements = array("&amp;", "&#37;", "&lt;", "&gt;", "&quot;", "&#39;", "&#40;", "&#41;", "&#43;", "&#45;");
$string = preg_replace($patterns, $replacements, $string);
$string = nl2br($string);
}
return $string;
}