summaryrefslogtreecommitdiff
path: root/program/lib/washtml.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-08 08:53:07 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-08 08:53:07 +0200
commit8c188058cf9281251cbac5cda43ef833843fd51b (patch)
treef7ccf7a0ac1f04acec6b87da65267b1d393439ea /program/lib/washtml.php
parentf8c96f737c1916377e361e3fbaa8a415c4101ca4 (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
Diffstat (limited to 'program/lib/washtml.php')
-rw-r--r--program/lib/washtml.php2
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 ? "'" : '"';