From 1cec627d7211115871511d134c94bd6786d937c3 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 24 Jan 2016 12:42:53 +0100 Subject: [PATCH] Allow bitcoin scheme to URLs --- classes/File_redirection.php | 1 + lib/util.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/File_redirection.php b/classes/File_redirection.php index 93cc640d34..491353a214 100644 --- a/classes/File_redirection.php +++ b/classes/File_redirection.php @@ -312,6 +312,7 @@ class File_redirection extends Managed_DataObject $out_url = str_replace('.-()', '', $out_url); break; + case 'bitcoin': case 'mailto': case 'magnet': case 'aim': diff --git a/lib/util.php b/lib/util.php index 20306635af..14de5bed73 100644 --- a/lib/util.php +++ b/lib/util.php @@ -885,7 +885,7 @@ function common_replace_urls_callback($text, $callback, $arg = null) { '(?:'. '(?:(?:https?|ftps?|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|ircs?)://)'. '|'. - '(?:(?:mailto|aim|tel|xmpp):)'. + '(?:(?:bitcoin|mailto|aim|tel|xmpp):)'. ')'. '(?:[\pN\pL\-\_\+\%\~]+(?::[\pN\pL\-\_\+\%\~]+)?\@)?'. //user:pass@ '(?:'.