diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php
index 843e03f0..e0e35fb3 100644
--- a/ext/bbcode/main.php
+++ b/ext/bbcode/main.php
@@ -15,6 +15,8 @@
*
[i]italic[/i]
* [u]underline[/u]
* [s]strikethrough[/s]
+ * [sup]superscript[/sup]
+ * [sub]subscript[/sub]
* [[wiki article]]
* [[wiki article|with some text]]
* [quote]text[/quote]
@@ -34,6 +36,8 @@ class BBCode extends FormatterExtension {
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text);
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "\\1", $text);
$text = preg_replace("/\[s\](.*?)\[\/s\]/s", "\\1", $text);
+ $text = preg_replace("/\[sup\](.*?)\[\/sup\]/s", "\\1", $text);
+ $text = preg_replace("/\[sub\](.*?)\[\/sub\]/s", "\\1", $text);
$text = preg_replace("/>>(\d+)(#c?(\d+))?/s", "", $text);
$text = preg_replace("/(^|\s)#(\d+)/s", "\\1#\\2", $text);
$text = preg_replace("/>>([^\d].+)/", "\\1
", $text);