From 9c12f504e2a2a1b004493179697e8abb4dc25474 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 15 Apr 2014 16:48:55 +0200 Subject: dont break parsing if url contains unencoded newlines --- it_url.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/it_url.class b/it_url.class index e961b4c..e66dfd4 100644 --- a/it_url.class +++ b/it_url.class @@ -51,7 +51,7 @@ function it_url($url = null, $options = array()) { $this->rawurl = $url; - if (preg_match('#^([a-z]+):/+(?:([^:]*):([^@]*)@)?(.*)$#i', $url, $regs)) + if (preg_match('#^([a-z]+):/+(?:([^:]*):([^@]*)@)?(.*)$#is', $url, $regs)) { $this->protocol = strtolower($regs[1]); $this->user = $regs[2]; @@ -81,7 +81,7 @@ function it_url($url = null, $options = array()) else $pattern = '^([a-z0-9_:\.-]+)/*(.*)$'; - if (preg_match("#$pattern#i", $url, $regs)) + if (preg_match("#$pattern#is", $url, $regs)) { list($hostname, $port) = explode(':', $regs[1]); -- cgit v1.2.3