diff --git a/upload/static/js/bbcode.js b/upload/static/js/bbcode.js
index 0ca6b866258e8e3fd495165c360ae702ac5c2dd6..67f0b8d7a8e6534bb1beca0fb7149bf0fa7ef9a1 100644
--- a/upload/static/js/bbcode.js
+++ b/upload/static/js/bbcode.js
@@ -77,7 +77,7 @@ function bbcode2html(str) {
if(!fetchCheckbox('bbcodeoff') && allowbbcode) {
str = clearcode(str);
str = str.replace(/\[url\]\s*((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.)([^\[\"']+?)\s*\[\/url\]/ig, function($1, $2, $3, $4) {return cuturl($2 + $4);});
- str = str.replace(/\[url=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:)?([^\r\n\[\"']+?)\]([\s\S]+?)\[\/url\]/ig, '$4');
+ str = str.replace(/\[url=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:|tel:|magnet:)?([^\r\n\[\"']+?)\]([\s\S]+?)\[\/url\]/ig, '$4');
str = str.replace(/\[email\](.[^\\=[]*)\[\/email\]/ig, '$1');
str = str.replace(/\[email=(.[^\\=[]*)\](.*?)\[\/email\]/ig, '$2');
str = str.replace(/\[postbg\]\s*([^\[\<\r\n;'\"\?\(\)]+?)\s*\[\/postbg\]/ig, function($1, $2) {
@@ -157,7 +157,7 @@ function bbcode2html(str) {
function clearcode(str) {
str= str.replace(/\[url\]\[\/url\]/ig, '', str);
- str= str.replace(/\[url=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:)?([^\s\[\"']+?)\]\[\/url\]/ig, '', str);
+ str= str.replace(/\[url=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:|tel:|magnet:)?([^\s\[\"']+?)\]\[\/url\]/ig, '', str);
str= str.replace(/\[email\]\[\/email\]/ig, '', str);
str= str.replace(/\[email=(.[^\[]*)\]\[\/email\]/ig, '', str);
str= str.replace(/\[color=([^\[\<]+?)\]\[\/color\]/ig, '', str);