summaryrefslogtreecommitdiff
path: root/lib/htmlpurifier/library/HTMLPurifier/URIScheme/news.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/htmlpurifier/library/HTMLPurifier/URIScheme/news.php')
-rw-r--r--lib/htmlpurifier/library/HTMLPurifier/URIScheme/news.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/htmlpurifier/library/HTMLPurifier/URIScheme/news.php b/lib/htmlpurifier/library/HTMLPurifier/URIScheme/news.php
new file mode 100644
index 000000000..84a6748d8
--- /dev/null
+++ b/lib/htmlpurifier/library/HTMLPurifier/URIScheme/news.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * Validates news (Usenet) as defined by generic RFC 1738
+ */
+class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme {
+
+ public $browsable = false;
+ public $may_omit_host = true;
+
+ public function doValidate(&$uri, $config, $context) {
+ $uri->userinfo = null;
+ $uri->host = null;
+ $uri->port = null;
+ $uri->query = null;
+ // typecode check needed on path
+ return true;
+ }
+
+}
+
+// vim: et sw=4 sts=4