aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/htmlawed/start.php10
1 files changed, 7 insertions, 3 deletions
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 <p > 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');