summaryrefslogtreecommitdiff
path: root/www/w3m/patches/patch-al
blob: 5a2aadc37a10708ac2e0acba80b83643916f94b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-al,v 1.1 2011/04/05 05:55:29 uebayasi Exp $

http://gnats.netbsd.org/42400

this patch adds support for single quoted meta refresh parameters, which is
needed to access GMail with w3m.

from: Paul Boekholt ( boekholt ) - 2008-09-06 06:54
support single quoted meta refresh parameter - ID: 2096461
http://sourceforge.net/tracker/?func=detail&aid=2096461&group_id=39518&atid=425441

--- file.c.orig	2011-01-04 09:22:21.000000000 +0000
+++ file.c
@@ -4284,15 +4284,15 @@ getMetaRefreshParam(char *q, Str *refres
     while (*q) {
 	if (!strncasecmp(q, "url=", 4)) {
 	    q += 4;
-	    if (*q == '\"')	/* " */
+	    if (*q == '\"' || *q == '\'')	/* " or ' */
 		q++;
 	    r = q;
 	    while (*r && !IS_SPACE(*r) && *r != ';')
 		r++;
 	    s_tmp = Strnew_charp_n(q, r - q);
 
-	    if (s_tmp->ptr[s_tmp->length - 1] == '\"') {	/* " 
-								 */
+	    if (s_tmp->ptr[s_tmp->length - 1] == '\"' ||	/* " */
+	        s_tmp->ptr[s_tmp->length - 1] == '\'') {	/* ' */
 		s_tmp->length--;
 		s_tmp->ptr[s_tmp->length] = '\0';
 	    }