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
55HYPERMAIL VERSION 2.4.1:
66============================
77
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+
8142020-06-19 Jose Kahan
9- * domains.c
15+ * src/ domains.c
1016 valid_root_domains() was validating a domain name against the
1117 historical DNS domains such as .org, .com. DNS has evolved and allows a
1218 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)
19411941 && ((istelprotocol && (* inputp == '+' || isdigit (* inputp )))
19421942 || (!istelprotocol && !ispunct (* inputp )))) {
19431943
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+ }
19481957 }
19491958
19501959 if (urlscan == 1 ) {
You can’t perform that action at this time.
0 commit comments