We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 56d7348e authored by Sean Murphy's avatar Sean Murphy

Fixed #1149: URL auto-linking bug when following colon.

parent e08b7f72
......@@ -394,7 +394,21 @@ function common_render_text($text)
function common_replace_urls_callback($text, $callback) {
// Start off with a regex
preg_match_all('#(?:(?:(?:https?|ftps?|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|xmpp|irc)://|(?:mailto|aim|tel):)[^.\s]+\.[^\s]+|(?:[^.\s/]+\.)+(?:museum|travel|[a-z]{2,4})(?:[:/][^\s]*)?)#i', $text, $matches);
$regex = '#
preg_match_all($regex, $text, $matches);
// Then clean up what the regex left behind
$offset = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment