Chewits / MaximusBrood

Maximus Brood - website development
2 stars 0 forks source link

bbcode parser - function urlreplace bug #36

Closed Chewits closed 13 years ago

Chewits commented 13 years ago

If user puts [URL] www.google.com [/URL] the returned output does not put "http://" in front of the link, which leads to an incorrect link. eg, "http://localhost/MB/forum/view/www.yahoo.com"

FinnG commented 13 years ago

This should be a non issue. There is a cakephp helper that can auto replace urls.

On 15 Aug 2011, at 00:19, Chewitsreply@reply.github.com wrote:

If user puts [URL] www.google.com [/URL] the returned output does not put "http://" in front of the link, which leads to an incorrect link. eg, "http://localhost/MB/forum/view/www.yahoo.com"

Reply to this email directly or view it on GitHub: https://github.com/Chewits/MaximusBrood/issues/36

Chewits commented 13 years ago

you can do [url=www.google.com]click me[/url] with this function. (it is same problem as before) i have this almost fixed anyway

Chewits commented 13 years ago

Fixed. Head scratching for so long, turns out it was because i had used 2 different types of quotes in preg_replace, when it needed to be the same. So it wasnt doing the proper preg replace cuz it coundn't find ' ' when it was " ".

:)