diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index e0975f9f0b..dd62c5d841 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -50,7 +50,7 @@ use Friendica\Util\XML; class BBCode { // Update this value to the current date whenever changes are made to BBCode::convert - const VERSION = '2020-12-18'; + const VERSION = '2020-12-18-video-embeds'; const INTERNAL = 0; const API = 2; @@ -1467,7 +1467,7 @@ class BBCode $text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism", '$2', $text); // Check for CSS classes - $text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism", '$2', $text); + $text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism", '$2', $text); // handle nested lists $endlessloop = 0; diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index 1769e6fd72..2eb5d1903d 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -277,6 +277,10 @@ class BBCodeTest extends MockedTest 'expectedHTML' => 'dare to move your mouse here', 'text' => '[color=FFFFFF]dare to move your mouse here[/color]' ], + 'bug-9639-span-classes' => [ + 'expectedHTML' => 'Test', + 'text' => '[class=arbitrary classes]Test[/class]', + ], ]; }