MyBB Community Forums

Full Version: mycode_auto_url should accept localhost
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If url is from localhost (without first level domain ".???"), the url is not parsed.
It was a little frustrating to find where is the problem, while working with forum in localhost.

The problem is here:
	$message = preg_replace("#([\>\s\(\)])(http|https|ftp|news){1}://([^\/\"\s\<\[\.]+\.([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/[^\"\s<\[]*)?)#i", "$1[url]$2://$3[/url]", $message);
dot is the must in url: "\.".

But why? http://whatever is a valid url. And it can be very real in local environment.