From 0f7eba2a0b276e7a23e442b7a9786e04622acbba Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 20 May 2014 10:32:44 +0200 Subject: Fix handling of {unwrap} tags in word_wrap() functions * in Email library: these tags were not removed * in text helper: simplified code --- system/libraries/Email.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 2595032c9..fc1bbe1b2 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1173,12 +1173,12 @@ class CI_Email { // If the current word is surrounded by {unwrap} tags we'll // strip the entire chunk and replace it with a marker. $unwrap = array(); - if (preg_match_all('|(\{unwrap\}.+?\{/unwrap\})|s', $str, $matches)) + if (preg_match_all('|\{unwrap\}(.+?)\{/unwrap\}|s', $str, $matches)) { for ($i = 0, $c = count($matches[0]); $i < $c; $i++) { $unwrap[] = $matches[1][$i]; - $str = str_replace($matches[1][$i], '{{unwrapped'.$i.'}}', $str); + $str = str_replace($matches[0][$i], '{{unwrapped'.$i.'}}', $str); } } -- cgit v1.2.3-24-g4f1b