From: Hypolite Petovan Date: Tue, 10 Apr 2018 10:23:40 +0000 (-0400) Subject: [BBCode] Improve support for strikethrough X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=369518e7b6ba68d8708cb34d87860e16e9db673c;p=friendica.git [BBCode] Improve support for strikethrough --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 97b8092118..3755593465 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1583,7 +1583,7 @@ class BBCode extends BaseObject $text = preg_replace("(\[u\](.*?)\[\/u\])ism", '$1', $text); // Check for strike-through text - $text = preg_replace("(\[s\](.*?)\[\/s\])ism", '$1', $text); + $text = preg_replace("(\[s\](.*?)\[\/s\])ism", '$1', $text); // Check for over-line text $text = preg_replace("(\[o\](.*?)\[\/o\])ism", '$1', $text); diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index f82a254d3d..896db876f5 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -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]");