aboutsummaryrefslogtreecommitdiff
path: root/mod/htmlawed/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/htmlawed/start.php')
-rw-r--r--mod/htmlawed/start.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/htmlawed/start.php b/mod/htmlawed/start.php
index b52a390bb..12b6470a3 100644
--- a/mod/htmlawed/start.php
+++ b/mod/htmlawed/start.php
@@ -92,7 +92,13 @@ function htmLawedArray(&$v, $k, $htmlawed_config) {
* @param array $attributes An array of attributes
* @return string
*/
-function htmlawed_tag_post_processor($element, $attributes = array()) {
+function htmlawed_tag_post_processor($element, $attributes = false) {
+ if ($attributes === false) {
+ // This is a closing tag. Prevent further processing to avoid inserting a duplicate tag
+
+ return "</${element}>";
+ }
+
// these are the default styles used by tinymce.
$allowed_styles = array(
'color', 'cursor', 'text-align', 'vertical-align', 'font-size',