diff options
author | Vitaly Takmazov | 2024-08-30 05:55:13 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-08-30 05:55:13 +0300 |
commit | 14519508e9e02760ddd1a7b2c91ad79968329198 (patch) | |
tree | d35a1affde123f4cbc5c18a7198adc1b4077dfe9 /src/main/java | |
parent | 54394658178201f4a8fd6c7000bc9edd503db7d6 (diff) |
Fix URL regex
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/util/MessageUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java index 42c97d84..316adb90 100644 --- a/src/main/java/com/juick/util/MessageUtils.java +++ b/src/main/java/com/juick/util/MessageUtils.java @@ -57,7 +57,7 @@ public class MessageUtils { private final static String urlWhiteSpacePrefix = "((?<=\\s)|(?<=\\A))"; - private final static String urlRegex = "((?:ht|f)tps?://(?:www\\.)?([^\\/\\s\\n\\\"]+)/?[^\\]\\s\\n\\\"\\>]*)"; + private final static String urlRegex = "((?:(?:ht|f)tps?://(?:www\\.)?([^\\s()<>/?#]+)([^\\s()<>]*)?))"; private final static String urlWithWhitespacesRegex = urlWhiteSpacePrefix + urlRegex; |