You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2022/03/21 19:36:48 UTC

[incubator-ponymail-foal] branch master updated: FIx URL highlighter to work with message-id URLs. Also to work with[url] syntax

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new f3a4716  FIx URL highlighter to work with message-id URLs. Also to work with[url] syntax
f3a4716 is described below

commit f3a47169561a65fd66db8b89d591d14edf379166
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Mar 21 20:36:45 2022 +0100

    FIx URL highlighter to work with message-id URLs. Also to work with[url] syntax
    
    [https://www.foo.bar/baz] => [<link here>https://www.foo.bar/baz</link here>]
---
 webui/js/source/body-fixups.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webui/js/source/body-fixups.js b/webui/js/source/body-fixups.js
index b8bec27..952c65b 100644
--- a/webui/js/source/body-fixups.js
+++ b/webui/js/source/body-fixups.js
@@ -15,7 +15,7 @@
  limitations under the License.
  */
 
-const PONYMAIL_URL_RE = new RegExp("(" + "(?:(?:[a-z]+)://)" + "(?:\\S+(?::\\S*)?@)?" + "(?:" + "([01][0-9][0-9]|2[0-4][0-9]|25[0-5])" + "|" + "(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)" + "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" + "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))" + "\\.?" + ")" + "(?::\\d{2,5})?" + "(?:[/?#]([^,<>()\\[\\] \\t\\r\\n]|(<[^:\\s]*?>|\\([^:\\s]*?\\)|\\[[^:\\s]*?\\]))*)?" + ")\\.?", "mi");
+const PONYMAIL_URL_RE = new RegExp("(" + "(?:(?:[a-z]+)://)" + "(?:\\S+(?::\\S*)?@)?" + "(?:" + "([01][0-9][0-9]|2[0-4][0-9]|25[0-5])" + "|" + "(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)" + "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" + "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))" + "\\.?" + ")" + "(?::\\d{2,5})?" + "\\/?" + "(?:[/?#]?([^,<>()\\[\\] \\t\\r\\n]|(<[^:\\s]*?>|\\([^:\\s]*?\\)|\\[[^:\\s]*?\\]))*)?" + ")\\.?" + "\\b", "mi");
 
 // Regex for things to potentially put inside quote objects:
 // - quotes