Merge branch 'MDL-40255_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE
[moodle.git] / lib / htmlpurifier / locallib.php
blob66e4e97ef0e5ddb5d6281944970e45cf91058977
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17 /**
18 * Extra classes needed for HTMLPurifier customisation for Moodle.
20 * @package core
21 * @copyright 2012 Petr Skoda {@link http://skodak.org}
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL 3 or later
25 defined('MOODLE_INTERNAL') || die();
28 /**
29 * Validates RTSP defined by RFC 2326
31 class HTMLPurifier_URIScheme_rtsp extends HTMLPurifier_URIScheme {
33 public $browsable = true;
34 public $hierarchical = true;
36 public function doValidate(&$uri, $config, $context) {
37 $uri->userinfo = null;
38 return true;
44 /**
45 * Validates IRC defined by IETF Draft
47 class HTMLPurifier_URIScheme_irc extends HTMLPurifier_URIScheme {
49 public $browsable = true;
50 public $hierarchical = true;
52 public function doValidate(&$uri, $config, $context) {
53 $uri->userinfo = null;
54 return true;
60 /**
61 * Validates MMS defined by Microsoft
63 class HTMLPurifier_URIScheme_mms extends HTMLPurifier_URIScheme {
65 public $browsable = true;
66 public $hierarchical = true;
68 public function doValidate(&$uri, $config, $context) {
69 $uri->userinfo = null;
70 return true;
76 /**
77 * Validates Gopher defined by RFC 4266
79 class HTMLPurifier_URIScheme_gopher extends HTMLPurifier_URIScheme {
81 public $browsable = true;
82 public $hierarchical = true;
84 public function doValidate(&$uri, $config, $context) {
85 $uri->userinfo = null;
86 return true;
92 /**
93 * Validates TeamSpeak defined by TeamSpeak
95 class HTMLPurifier_URIScheme_teamspeak extends HTMLPurifier_URIScheme {
97 public $browsable = true;
98 public $hierarchical = true;
100 public function doValidate(&$uri, $config, $context) {
101 $uri->userinfo = null;
102 return true;