From 44639ca404d5737e880edcade603bfe0529b55f1 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 8 Jun 2009 00:11:22 +0000 Subject: [PATCH] BUGFIX #4150 banal: Fixed PreserveLinks option in Convert::html2raw git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78555 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Convert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Convert.php b/core/Convert.php index b6b067e75..ae9be210e 100755 --- a/core/Convert.php +++ b/core/Convert.php @@ -267,7 +267,7 @@ class Convert extends Object { ); } // Expand hyperlinks - if( !$preserveLinks && !isset($config['PreserveLink'])) { + if(!$preserveLinks && !$config['PreserveLinks']) { $data = preg_replace('/]*href\s*=\s*"([^"]*)">(.*?)<\/a>/ie', "Convert::html2raw('\\2').'[\\1]'", $data); $data = preg_replace('/]*href\s*=\s*([^ ]*)>(.*?)<\/a>/ie', "Convert::html2raw('\\2').'[\\1]'", $data); @@ -306,7 +306,7 @@ class Convert extends Object { // strip_tags seemed to be restricting the length of the output // arbitrarily. This essentially does the same thing. - if( !$preserveLinks ) { + if(!$preserveLinks && !$config['PreserveLinks']) { $data = preg_replace('/<\/?[^>]*>/','', $data); } else { $data = strip_tags($data, '');