diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-06-08 08:53:07 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-06-08 08:59:10 +0200 |
commit | 51809bd66c3dc08fb578950a0394c8603a419b9e (patch) | |
tree | c8cef6c331d546a9634fecdade23a01371456c03 /program/lib/washtml.php | |
parent | 49db5234109c4e46e82b0ece8b0f8da58ce5ea69 (diff) |
Fix handling of links with various URI schemes e.g. "skype:" (#1488106)
Fix handling of links inside PRE elements on html to text conversion
Fix indexing of links on html to text conversion
Conflicts:
CHANGELOG
Diffstat (limited to 'program/lib/washtml.php')
-rw-r--r-- | program/lib/washtml.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/washtml.php b/program/lib/washtml.php index 4221abdef..6ea59f03f 100644 --- a/program/lib/washtml.php +++ b/program/lib/washtml.php @@ -202,7 +202,7 @@ class washtml $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('!^([a-z][a-z0-9.+-]+:|//|#).+!i', $value))) $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"'; else if ($key == 'style' && ($style = $this->wash_style($value))) { $quot = strpos($style, '"') !== false ? "'" : '"'; |