CodeIgniter Forums
auto_link() bug, with fix - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: auto_link() bug, with fix (/thread-44960.html)

auto_link() bug, with fix - El Forum - 09-02-2011

fairly simple, but client has a edit screen that wraps each line with
tags, so you get:

(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:

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?