diff options
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/it_html.class b/it_html.class index 6f4bc91..424559c 100644 --- a/it_html.class +++ b/it_html.class @@ -527,6 +527,10 @@ static function U(/* ... */) $schemepart = $hostpart ? ($u['scheme'] ? $u['scheme'] . ":" : "") . "//$hostpart" : ($u['scheme'] == "mailto" ? $u['scheme'] . ":" : ""); + # remove strings that will be interpreted as scheme from path + if (!$schemepart && !$hostpart) + $u['path'] = preg_replace('|^([^/]*:)+|', '', $u['path']); + # sanitize path and fragment $u['path'] = preg_replace('|\\\\|', '/', $u['path']); # turn \ to / foreach (['path', 'query', 'fragment'] as $key) |