From 369518e7b6ba68d8708cb34d87860e16e9db673c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 10 Apr 2018 06:23:40 -0400 Subject: [PATCH] [BBCode] Improve support for strikethrough --- src/Content/Text/BBCode.php | 2 +- src/Content/Text/HTML.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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]"); -- 2.39.5