aboutsummaryrefslogtreecommitdiff
path: root/src/NetUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NetUtils.cpp')
-rw-r--r--src/NetUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/NetUtils.cpp b/src/NetUtils.cpp
index 8bb5a0e..3539d46 100644
--- a/src/NetUtils.cpp
+++ b/src/NetUtils.cpp
@@ -1617,12 +1617,12 @@ namespace QuickMedia {
contains_dot = true;
}
- if(url_start != std::string::npos && !is_valid_url && contains_dot && (is_whitespace(c) || c == '/' || c == ',' || c == ':' || c == ')' || c == '\0' || (c == '.' && i == str.size()))) {
+ if(url_start != std::string::npos && !is_valid_url && contains_dot && (is_whitespace(c) || c == '/' || c == ',' || c == ':' || c == '?' || c == ')' || c == '\0' || (c == '.' && i == str.size()))) {
size_t tld_end = i - 1;
char prev_char = str[i - 1];
// We want to remove the last . or , because the string could contain for example "click on this link: example.com. There you can..."
// and we want those links to work, I guess?
- if(prev_char == '.' || prev_char == ',' || prev_char == ':')
+ if(prev_char == '.' || prev_char == ',' || prev_char == ':' || prev_char == '?')
--tld_end;
else if(prev_char == ')' && parentheses_depth != 0)
--tld_end;
@@ -1669,7 +1669,7 @@ namespace QuickMedia {
char prev_char = str[i - 1];
// We want to remove the last . or , because the string could contain for example "click on this link: example.com. There you can..."
// and we want those links to work, I guess?
- if(prev_char == '.' || prev_char == ',' || prev_char == ':')
+ if(prev_char == '.' || prev_char == ',' || prev_char == ':' || prev_char == '?')
--url_length;
else if(prev_char == ')' && parentheses_depth != 0)
--url_length;