diff --git a/framework/helper.php b/framework/helper.php index e0cf0e9..05ef8ad 100644 --- a/framework/helper.php +++ b/framework/helper.php @@ -250,6 +250,10 @@ public static function protect() **/ public static function wrap($text, $tag, $escape = TRUE) { + // Do a little sanity check & cleanup on the tag: + $tag = trim($tag); + if (substr($tag,-1) != '>') { $tag .= '>'; } + // Determine the closing tag, based upon the opening one: preg_match('/^<([^ >]+)/', $tag, $matches); $closing = "";