From 3f58bd94b4092c95424391d9843c8c786ac87479 Mon Sep 17 00:00:00 2001 From: brettp Date: Sun, 31 Jan 2010 19:04:17 +0000 Subject: htmlawed no longer creates tags with extra spaces (

). git-svn-id: http://code.elgg.org/elgg/trunk@3869 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/htmlawed/start.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mod/htmlawed') diff --git a/mod/htmlawed/start.php b/mod/htmlawed/start.php index d027fa34f..14e45a6d9 100644 --- a/mod/htmlawed/start.php +++ b/mod/htmlawed/start.php @@ -77,8 +77,12 @@ function htmlawed_hook($element, $attribute_array) { } } - $string = trim($string); - $r = "<$element $string>"; + // some things (tinymce) don't like tags like

so make sure + // to only add a space if needed. + if ($string = trim($string)) { + $string = " $string"; + + $r = "<$element$string>"; return $r; } @@ -114,4 +118,4 @@ function htmlawed_filter_tags($hook, $entity_type, $returnvalue, $params) { } -register_elgg_event_handler('init', 'system', 'htmlawed_init'); \ No newline at end of file +register_elgg_event_handler('init', 'system', 'htmlawed_init'); -- cgit v1.2.3