From 3597cc2c1b22dc29fe1169075601c72fa5c8558c Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Mon, 09 Nov 2009 11:18:58 -0500
Subject: [PATCH] Plugins should not overwrite existing config props
---
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 efd525d..fb2533b 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -87,7 +87,7 @@
static $html_attribs = array('name', 'class', 'title', 'alt', 'width', 'height', 'align', 'nowrap', 'col', 'row', 'id', 'rowspan', 'colspan', 'cellspacing', 'cellpadding', 'valign', 'bgcolor', 'color', 'border', 'bordercolorlight', 'bordercolordark', 'face', 'marginwidth', 'marginheight', 'axis', 'border', 'abbr', 'char', 'charoff', 'clear', 'compact', 'coords', 'vspace', 'hspace', 'cellborder', 'size', 'lang', 'dir');
/* Block elements which could be empty but cannot be returned in short form (<tag />) */
- static $block_elements = array('div', 'p', 'pre', 'blockquote');
+ static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a');
/* State for linked objects in HTML */
public $extlinks = false;
@@ -171,7 +171,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)))
$t .= ' style="' . $style . '"';
--
Gitblit v1.9.1