aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-08-30 05:55:13 +0300
committerGravatar Vitaly Takmazov2024-08-30 05:55:13 +0300
commit14519508e9e02760ddd1a7b2c91ad79968329198 (patch)
treed35a1affde123f4cbc5c18a7198adc1b4077dfe9 /src/main/java/com/juick
parent54394658178201f4a8fd6c7000bc9edd503db7d6 (diff)
Fix URL regex
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/util/MessageUtils.java2
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;