瀏覽代碼

fix: Use https for links without a scheme.

j8
Boris Grozev 8 年之前
父節點
當前提交
aee5a9ca43
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      modules/UI/side_pannels/chat/Replacement.js

+ 1
- 1
modules/UI/side_pannels/chat/Replacement.js 查看文件

@@ -27,7 +27,7 @@ export function linkify(inputText) {
27 27
 
28 28
     //URLs starting with "www." (without // before it, or it'd re-link the ones done above).
29 29
     replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
30
-    replacedText = replacedText.replace(replacePattern2, '$1<a href="http://$2" target="_blank" rel="noopener noreferrer">$2</a>');
30
+    replacedText = replacedText.replace(replacePattern2, '$1<a href="https://$2" target="_blank" rel="noopener noreferrer">$2</a>');
31 31
 
32 32
     //Change email addresses to mailto: links.
33 33
     replacePattern3 = /(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim;

Loading…
取消
儲存