From 89c30a00a71988c8db632f8f3cc94ed241bdaa1f Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sun, 01 Jan 2012 07:26:08 -0500
Subject: [PATCH] - Don't load jqueryui plugin, it's required now by default - Move datepicker's date format setting to the plugin

---
 program/lib/washtml.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index 8bbc136..04a65c7 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -168,7 +168,7 @@
                 || ($src = $this->config['cid_map'][$this->config['base_url'].$match[2]])) {
               $value .= ' url('.htmlspecialchars($src, ENT_QUOTES) . ')';
             }
-            else if (preg_match('/^(http|https|ftp):.*$/i', $match[2], $url)) {
+            else if (preg_match('!^(https?:)?//[a-z0-9/._+-]+$!i', $match[2], $url)) {
               if ($this->config['allow_remote'])
                 $value .= ' url('.htmlspecialchars($url[0], ENT_QUOTES).')';
               else
@@ -199,7 +199,7 @@
       $key = strtolower($key);
       $value = $node->getAttribute($key);
       if (isset($this->_html_attribs[$key]) ||
-         ($key == 'href' && preg_match('/^(http:|https:|ftp:|mailto:|#).+/i', $value)))
+         ($key == 'href' && preg_match('!^(http:|https:|ftp:|mailto:|//|#).+!i', $value)))
         $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"';
       else if ($key == 'style' && ($style = $this->wash_style($value))) {
         $quot = strpos($style, '"') !== false ? "'" : '"';

--
Gitblit v1.9.1