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

Commit 120eb774 authored by Adrian Lang's avatar Adrian Lang Committed by Evan Prodromou

Fixes #1258: A period in a hashtag leads to the tag being interpreted as url...

Fixes #1258: A period in a hashtag leads to the tag being interpreted as url and hence breaking the tag.
parent 32e0fb14
......@@ -456,6 +456,9 @@ function common_replace_urls_callback($text, $callback) {
if (!in_array($url_parts[2], $tlds)) continue;
// Make sure we didn't capture a hash tag
if (strpos($url, '#') === 0) continue;
// Put the url back the way we found it.
$url = (mb_strpos($orig_url, htmlspecialchars($url)) === FALSE) ? $url:htmlspecialchars($url);
......
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