| | |
| | | || ($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 |
| | |
| | | $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 ? "'" : '"'; |