diff --git a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php index 9d3f9266..b6efcbcf 100644 --- a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php +++ b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php @@ -436,7 +436,7 @@ p.wl_notopbottom { 'acronym', 'cite', 'code', 'dfn', 'em', 'kbd', 'strong', 'samp', 'var', 'a', 'bdo', 'bdi', 'map', 'object', 'q', 'script', 'span', 'sub', 'sup', 'button', - 'label', 'select', 'textarea', 's' + 'label', 'select', 'textarea', 's', 'strike' ); var $allowed_p_parents = array('blockquote', 'td', 'div', 'article', 'aside', 'dd', @@ -542,9 +542,16 @@ p.wl_notopbottom { { // unknown tag definition $text[$tagstart_b] = '<'; - $text[strpos($textstring,'>',$i)] = '>'; + $tagstart = false; + $tagdef = false; + if ( $text[$i] == '>' ) { $text[$i] = '>'; } } else { + //convert to lowercase + for ($j = $tagdef; $j <= $i; $j++) + { + $text[$j] = strtolower($text[$j]); + } $tagdef = false; // closing > if ($text[$i] == '>') @@ -583,11 +590,7 @@ p.wl_notopbottom { $tagdef = $i; $tagstart_b = $tagstart; $tagstart = false; - $text[$i] = strtolower($text[$i]); } - // definition characters - elseif ($tagdef) - { $text[$i] = strtolower($text[$i]); } // quotes in style - isolate elseif ($tagstyle && $text[$i] == '\'' && !$doublequote ) {