You need to regenerate schema.ser
, use maintenance/generate-schema-cache.php
.
Last active
April 27, 2017 10:13
-
-
Save Znarkus/6019105 to your computer and use it in GitHub Desktop.
Disable URI validation in HTML Purifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 65796c80773c91791e0163ac7918c8bfa5e42ffc Mon Sep 17 00:00:00 2001 | |
From: Markus Hedlund <[email protected]> | |
Date: Wed, 17 Jul 2013 11:12:29 +0200 | |
Subject: [PATCH] html purifier disable uri validation | |
--- | |
.../library/HTMLPurifier/AttrDef/URI.php | 1 + | |
.../ConfigSchema/schema/URI.DisableValidation.txt | 7 ++++ | |
2 files changed, 5 insertions(+), 0 deletions(-) | |
create mode 100644 library/HTMLPurifier/ConfigSchema/schema/URI.DisableValidation.txt | |
diff --git a/library/HTMLPurifier/AttrDef/URI.php b/library/HTMLPurifier/AttrDef/URI.php | |
index 48d27a9..4d8c811 100644 | |
--- a/library/HTMLPurifier/AttrDef/URI.php | |
+++ b/library/HTMLPurifier/AttrDef/URI.php | |
@@ -26,6 +26,7 @@ class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef | |
public function validate($uri, $config, $context) { | |
if ($config->get('URI.Disable')) return false; | |
+ if ($config->get('URI.DisableValidation')) return true; | |
$uri = $this->parseCDATA($uri); | |
diff --git a/library/HTMLPurifier/ConfigSchema/schema/URI.DisableValidation.txt b/library/HTMLPurifier/ConfigSchema/schema/URI.DisableValidation.txt | |
new file mode 100644 | |
index 0000000..4060e35 | |
--- /dev/null | |
+++ b/library/HTMLPurifier/ConfigSchema/schema/URI.DisableValidation.txt | |
@@ -0,0 +1,7 @@ | |
+URI.DisableValidation | |
+TYPE: bool | |
+VERSION: 1.0.0 | |
+DEFAULT: false | |
+--DESCRIPTION-- | |
+Disable URI validation | |
+--# vim: et sw=4 sts=4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment