aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-21 18:33:59 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-21 18:33:59 +0000
commit2fdc8794ea3ff16c48983a08cd96e56fe0797008 (patch)
treed76c1ac50f44227926d336184f915e2640e891ff
parentindent (diff)
downloadw3m-2fdc8794ea3ff16c48983a08cd96e56fe0797008.tar.gz
w3m-2fdc8794ea3ff16c48983a08cd96e56fe0797008.zip
[w3m-dev 02880] URI_PATTERN
* url.c (URI_PATTERN): better match for % hex hex * url.c (chkExternalURIBuffer): don't use URI_PATTERN as format string From: Fumitoshi UKAI <ukai@debian.or.jp>
-rw-r--r--ChangeLog7
-rw-r--r--url.c8
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f702217..8acccc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-22 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * url.c (URI_PATTERN): better match for % hex hex
+ * url.c (chkExternalURIBuffer): don't use URI_PATTERN as format string
+
2002-01-22 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02879] reset signals
@@ -2184,4 +2189,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.248 2002/01/21 17:57:27 ukai Exp $
+$Id: ChangeLog,v 1.249 2002/01/21 18:33:59 ukai Exp $
diff --git a/url.c b/url.c
index 2f04ede..50931b8 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.37 2002/01/21 16:58:32 ukai Exp $ */
+/* $Id: url.c,v 1.38 2002/01/21 18:34:00 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -2081,7 +2081,7 @@ searchURIMethods(ParsedURL *pu)
* escaped = "%" hex hex
*/
-#define URI_PATTERN "[-;/?:@&=+$,a-zA-Z0-9_.!~*'()%]*"
+#define URI_PATTERN "([-;/?:@&=+$,a-zA-Z0-9_.!~*'()]|%[0-9A-Fa-f][0-9A-Fa-f])*"
void
chkExternalURIBuffer(Buffer *buf)
{
@@ -2090,11 +2090,11 @@ chkExternalURIBuffer(Buffer *buf)
for (i = 0; (ump = urimethods[i]) != NULL; i++) {
for (; ump->item1 != NULL; ump++) {
- reAnchor(buf, Sprintf("%s:" URI_PATTERN, ump->item1)->ptr);
+ reAnchor(buf, Sprintf("%s:%s", ump->item1, URI_PATTERN)->ptr);
}
}
for (ump = default_urimethods; ump->item1 != NULL; ump++) {
- reAnchor(buf, Sprintf("%s:" URI_PATTERN, ump->item1)->ptr);
+ reAnchor(buf, Sprintf("%s:%s", ump->item1, URI_PATTERN)->ptr);
}
}
#endif