Thomas Bruederli
2015-02-07 2f8b1036da42ec3d15a51c6b17a473f9f4df71d3
program/lib/Roundcube/rcube_washtml.php
@@ -1,6 +1,6 @@
<?php
/**
/*
 +-----------------------------------------------------------------------+
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2008-2012, The Roundcube Dev Team                       |
@@ -18,7 +18,7 @@
 +-----------------------------------------------------------------------+
 */
/**
/*
 *                Washtml, a HTML sanityzer.
 *
 * Copyright (c) 2007 Frederic Motte <fmotte@ubixis.com>
@@ -244,8 +244,8 @@
                $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"';
            }
            else if ($key == 'style' && ($style = $this->wash_style($value))) {
                $quot = strpos($style, '"') !== false ? "'" : '"';
                $t .= ' style=' . $quot . $style . $quot;
                // replace double quotes to prevent syntax error and XSS issues (#1490227)
                $t .= ' style="' . str_replace('"', '&quot;', $style) . '"';
            }
            else if ($key == 'background'
                || ($key == 'src' && preg_match('/^(img|source)$/i', $node->tagName))