]> git.mxchange.org Git - friendica.git/commitdiff
[BBCode] Improve support for strikethrough
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 10 Apr 2018 10:23:40 +0000 (06:23 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 10 Apr 2018 10:23:40 +0000 (06:23 -0400)
src/Content/Text/BBCode.php
src/Content/Text/HTML.php

index 97b809211801277b753922ff9e65aab6dda47304..3755593465db0687bbd642a0104fcecd998c304a 100644 (file)
@@ -1583,7 +1583,7 @@ class BBCode extends BaseObject
                $text = preg_replace("(\[u\](.*?)\[\/u\])ism", '<u>$1</u>', $text);
 
                // Check for strike-through text
-               $text = preg_replace("(\[s\](.*?)\[\/s\])ism", '<strike>$1</strike>', $text);
+               $text = preg_replace("(\[s\](.*?)\[\/s\])ism", '<s>$1</s>', $text);
 
                // Check for over-line text
                $text = preg_replace("(\[o\](.*?)\[\/o\])ism", '<span class="overline">$1</span>', $text);
index f82a254d3d66cbf6736c1c1fb8ac1843d7f2ca07..896db876f581bd5fa4eb0440f12e1bf49a3496d3 100644 (file)
@@ -221,6 +221,9 @@ class HTML
                self::tagToBBCode($doc, 'b', [], '[b]', '[/b]');
                self::tagToBBCode($doc, 'i', [], '[i]', '[/i]');
                self::tagToBBCode($doc, 'u', [], '[u]', '[/u]');
+               self::tagToBBCode($doc, 's', [], '[s]', '[/s]');
+               self::tagToBBCode($doc, 'del', [], '[s]', '[/s]');
+               self::tagToBBCode($doc, 'strike', [], '[s]', '[/s]');
 
                self::tagToBBCode($doc, 'big', [], "[size=large]", "[/size]");
                self::tagToBBCode($doc, 'small', [], "[size=small]", "[/size]");