This commit is contained in:
joyqi
2017-03-30 15:09:28 +08:00
parent 8ac2087abc
commit 2f2c2d5910
+3 -1
View File
@@ -2877,7 +2877,9 @@ else
else {
// Fixes common pasting errors.
text = text.replace(/^http:\/\/(https?|ftp):\/\//, '$1://');
if (!/^(?:https?|ftp):\/\//.test(text))
// fix issue #552
if (!/^(?:https?|ftp):\/\//.test(text) && !/^[_a-z0-9-]+:/i.test(text))
text = 'http://' + text;
}