Thomas Bruederli
2013-10-21 f06aa8058b7e32ba32d4551074b6e0b8a300f751
program/lib/washtml.php
@@ -102,7 +102,7 @@
    'cellpadding', 'valign', 'bgcolor', 'color', 'border', 'bordercolorlight',
    'bordercolordark', 'face', 'marginwidth', 'marginheight', 'axis', 'border',
    'abbr', 'char', 'charoff', 'clear', 'compact', 'coords', 'vspace', 'hspace',
    'cellborder', 'size', 'lang', 'dir', 'usemap', 'shape',
    'cellborder', 'size', 'lang', 'dir', 'usemap', 'shape', 'media',
    // attributes of form elements
    'type', 'rows', 'cols', 'disabled', 'readonly', 'checked', 'multiple', 'value'
  );
@@ -214,7 +214,7 @@
      $key = strtolower($key);
      $value = $node->getAttribute($key);
      if (isset($this->_html_attribs[$key]) ||
         ($key == 'href' && !preg_match('!^javascript!i', $value)
         ($key == 'href' && !preg_match('!^(javascript|vbscript|data:text)!i', $value)
           && preg_match('!^([a-z][a-z0-9.+-]+:|//|#).+!i', $value))
      ) {
        $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"';