diff options
Diffstat (limited to 'mod/htmlawed/start.php')
| -rw-r--r-- | mod/htmlawed/start.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/htmlawed/start.php b/mod/htmlawed/start.php index b52a390bb..25a70a4aa 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', @@ -150,10 +156,8 @@ function htmlawed_tag_post_processor($element, $attributes = array()) { * Runs unit tests for htmlawed * * @return array - * */ + */ function htmlawed_test($hook, $type, $value, $params) { - global $CONFIG; - $value[] = dirname(__FILE__) . '/tests/tags.php'; return $value; } |
