From feb526a9ba2ff35bb33b5f7f187d45ddabcd7f4a Mon Sep 17 00:00:00 2001 From: dho Date: Fri, 25 Aug 2006 12:45:07 +0000 Subject: [PATCH] Adding nl2br in Sanitize::html git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3430 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/sanitize.php | 1 + 1 file changed, 1 insertion(+) diff --git a/cake/libs/sanitize.php b/cake/libs/sanitize.php index 9989b9c2d..1a7f7f169 100644 --- a/cake/libs/sanitize.php +++ b/cake/libs/sanitize.php @@ -85,6 +85,7 @@ class Sanitize{ $patterns = array("/\&/", "/%/", "//", '/"/', "/'/", "/\(/", "/\)/", "/\+/", "/-/"); $replacements = array("&", "%", "<", ">", """, "'", "(", ")", "+", "-"); $string = preg_replace($patterns, $replacements, $string); + $string = nl2br($string); } return $string; }