Merge branch 'MDL-46286-master' of https://github.com/lucisgit/moodle

This commit is contained in:
Dan Poltawski
2014-07-14 12:33:59 +01:00
3 changed files with 20 additions and 0 deletions
+16
View File
@@ -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
*/
+3
View File
@@ -295,6 +295,9 @@ class core_htmlpurifier_testcase extends basic_testcase {
$text = '<a href="rtsp://www.example.com/movie.mov">link</a>';
$this->assertSame($text, purify_html($text));
$text = '<a href="rtmp://www.example.com/video.f4v">link</a>';
$this->assertSame($text, purify_html($text));
$text = '<a href="teamspeak://speak.example.com/?par=val?par2=val2">link</a>';
$this->assertSame($text, purify_html($text));
+1
View File
@@ -1680,6 +1680,7 @@ function purify_html($text, $options = array()) {
'nntp' => true,
'news' => true,
'rtsp' => true,
'rtmp' => true,
'teamspeak' => true,
'gopher' => true,
'mms' => true,