Welcome Guest, Not a member yet? Register   Sign In
auto_link() bug, with fix
#1

[eluser]jmadsen[/eluser]
fairly simple, but client has a edit screen that wraps each line with
Code:
<p>
tags, so you get:

Code:
<p>www.mysite.com</p>
(but same issue with any other tags) if you post an address on a single line, and auto_link() won't pick it up.

extending Url_helper line 344 and making it:

Code:
if (preg_match_all("#(^|\s|\(|>)((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))

(I added the ">" sign to list) takes care of it.

1) is this an ok fix?

2) should I propose it to CI?

3) how do I do so?

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB