diff --git a/lib/htmlpurifier/locallib.php b/lib/htmlpurifier/locallib.php
index 66e4e97ef0e..b949b7404fc 100644
--- a/lib/htmlpurifier/locallib.php
+++ b/lib/htmlpurifier/locallib.php
@@ -41,6 +41,22 @@ class HTMLPurifier_URIScheme_rtsp extends HTMLPurifier_URIScheme {
}
+/**
+ * Validates RTMP defined by Adobe
+ */
+class HTMLPurifier_URIScheme_rtmp extends HTMLPurifier_URIScheme {
+
+ public $browsable = false;
+ public $hierarchical = true;
+
+ public function doValidate(&$uri, $config, $context) {
+ $uri->userinfo = null;
+ return true;
+ }
+
+}
+
+
/**
* Validates IRC defined by IETF Draft
*/
diff --git a/lib/tests/htmlpurifier_test.php b/lib/tests/htmlpurifier_test.php
index 88a16440ae1..51d22c83b34 100644
--- a/lib/tests/htmlpurifier_test.php
+++ b/lib/tests/htmlpurifier_test.php
@@ -295,6 +295,9 @@ class core_htmlpurifier_testcase extends basic_testcase {
$text = 'link';
$this->assertSame($text, purify_html($text));
+ $text = 'link';
+ $this->assertSame($text, purify_html($text));
+
$text = 'link';
$this->assertSame($text, purify_html($text));
diff --git a/lib/weblib.php b/lib/weblib.php
index 55ae5f77452..c082abb2487 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -1680,6 +1680,7 @@ function purify_html($text, $options = array()) {
'nntp' => true,
'news' => true,
'rtsp' => true,
+ 'rtmp' => true,
'teamspeak' => true,
'gopher' => true,
'mms' => true,