diff options
author | Urban Müller | 2014-04-15 16:48:55 +0200 |
---|---|---|
committer | Urban Müller | 2014-04-15 16:48:55 +0200 |
commit | 9c12f504e2a2a1b004493179697e8abb4dc25474 (patch) | |
tree | 4c1d95fee3f00996e1b8cc8fd7667b231a9943c5 /it_url.class | |
parent | fef9b217cbdb76103112995d4b94e95468826562 (diff) | |
download | itools-9c12f504e2a2a1b004493179697e8abb4dc25474.tar.gz itools-9c12f504e2a2a1b004493179697e8abb4dc25474.tar.bz2 itools-9c12f504e2a2a1b004493179697e8abb4dc25474.zip |
dont break parsing if url contains unencoded newlines
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 4 |
1 files 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]); |