mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
554b4ceb42
commit
feb526a9ba
1 changed files with 1 additions and 0 deletions
|
@ -85,6 +85,7 @@ class Sanitize{
|
|||
$patterns = array("/\&/", "/%/", "/</", "/>/", '/"/', "/'/", "/\(/", "/\)/", "/\+/", "/-/");
|
||||
$replacements = array("&", "%", "<", ">", """, "'", "(", ")", "+", "-");
|
||||
$string = preg_replace($patterns, $replacements, $string);
|
||||
$string = nl2br($string);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue