mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-23 17:30:33 +00:00
fix: safari浏览器兼容性
This commit is contained in:
parent
65dedcd9ff
commit
de5cbe994d
2
resources/assets/js/functions/web.js
vendored
2
resources/assets/js/functions/web.js
vendored
@ -422,7 +422,7 @@
|
|||||||
if (/https*:\/\//.test(text)) {
|
if (/https*:\/\//.test(text)) {
|
||||||
text = text.split(/(<[^>]*>)/g).map(string => {
|
text = text.split(/(<[^>]*>)/g).map(string => {
|
||||||
if (string && !/<[^>]*>/.test(string)) {
|
if (string && !/<[^>]*>/.test(string)) {
|
||||||
string = string.replace(/(?<=[^'"])(https*:\/\/)((\w|=|\?|\.|\/|&|-|:|\+|%|;|#)+)/g, "<a href=\"$1$2\" target=\"_blank\">$1$2</a>")
|
string = string.replace(/([^'"])((https*:\/\/)((\w|=|\?|\.|\/|&|-|:|\+|%|;|#)+))/g, "$1<a href=\"$2\" target=\"_blank\">$2</a>")
|
||||||
}
|
}
|
||||||
return string;
|
return string;
|
||||||
}).join("")
|
}).join("")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user