File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,14 @@ Version Changes for Hypermail
5
5
HYPERMAIL VERSION 2.4.1:
6
6
============================
7
7
8
+ 2020-08-27 Jose Kahan
9
+ * src/string.c
10
+ extended parseurl() in a naive approach for supporting U+00A0
11
+ nonbreakable space inside sscanf. This function should eventually be
12
+ rewritten to use libpcre
13
+
8
14
2020-06-19 Jose Kahan
9
- * domains.c
15
+ * src/ domains.c
10
16
valid_root_domains() was validating a domain name against the
11
17
historical DNS domains such as .org, .com. DNS has evolved and allows a
12
18
bigger variety of domains than those this function verified. That part
Original file line number Diff line number Diff line change @@ -1941,10 +1941,19 @@ char *parseurl(char *input, char *charset)
1941
1941
&& ((istelprotocol && (* inputp == '+' || isdigit (* inputp )))
1942
1942
|| (!istelprotocol && !ispunct (* inputp )))) {
1943
1943
1944
- if (set_iso2022jp )
1945
- urlscan = sscanf (inputp , "%255[^] \033)<>\"\'\n[\t\\]" , urlbuff );
1946
- else
1947
- urlscan = sscanf (inputp , "%255[^] )<>\"\'\n[\t\\]" , urlbuff );
1944
+ if (set_iso2022jp ) {
1945
+ if (charset && !strncasecmp (charset , "UTF-8" , 5 )) {
1946
+ urlscan = sscanf (inputp , "%255[^] \u00a0\033)<>\"\'\n[\t\\]" , urlbuff );
1947
+ } else {
1948
+ urlscan = sscanf (inputp , "%255[^] \033)<>\"\'\n[\t\\]" , urlbuff );
1949
+ }
1950
+ } else {
1951
+ if (charset && !strncasecmp (charset , "UTF-8" , 5 )) {
1952
+ urlscan = sscanf (inputp , "%255[^] \u00a0)<>\"\'\n[\t\\]" , urlbuff );
1953
+ } else {
1954
+ urlscan = sscanf (inputp , "%255[^] )<>\"\'\n[\t\\]" , urlbuff );
1955
+ }
1956
+ }
1948
1957
}
1949
1958
1950
1959
if (urlscan == 1 ) {
You can’t perform that action at this time.
0 commit comments