Welcome Guest, Not a member yet? Register   Sign In
auto_link with <p> tags
#1

[eluser]Konfine[/eluser]
Hi All,

I've come across with a problem using the URL Helper -> auto_link function.

I'm currently creating a forum in which I use the TinyMCE JS editor for the posts, when I return back the main post the JS automatically enters the <p> tags for each new line in the database, this isn't a problem but even when passing the function around the description it's not correctly returning a linked URL.

example:

Code:
auto_link("<p>www.shopto.net</p>")

Can anyone tell me how to fix this?

Thanks in advance!
#2

[eluser]Konfine[/eluser]
Bump?
#3

[eluser]Derek Allard[/eluser]
Yup, looks like a bug. Feel free to file a bug report Konfine. you can get around it by adding spaces before your url.
#4

[eluser]infinivert[/eluser]
I'm running into this same bug. Wouldn't this just be a quick adjustment to the RegEx here?

Code:
if ($type != 'email')
        {
            if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
            {

I'm not very good with RegEx. Anybody know how to fix this so links within paragraph (or other) tags will be auto-linked?

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB