[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Patch for "send email to interested parties"
From: |
Dieperink Alwin |
Subject: |
RE: Patch for "send email to interested parties" |
Date: |
Wed, 14 May 2003 17:33:33 +0200 |
Hi Yngve,
Since this patch had been applied, I upgraded to MSIE 6.0. And guess...
Microsoft has changed the way they handle URLs... :-(
HTTP_USER_AGENT now gives: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.0)"
So I prepared a new version of the test, which should only have a changed
behaviour for the new browser:
# Netscape Navigator up to and including 4.x should get the URL in
# the body encoded only once -- and so should Opera
# and so should MSIE > 6.0
unless ( (($ENV{'HTTP_USER_AGENT'} =~ "Mozilla\/(.)(.*)") && ($1 < 5)
&& ($2 !~ "compatible"))
|| $ENV{'HTTP_USER_AGENT'} =~ "Opera\/"
|| ($ENV{'HTTP_USER_AGENT'} =~ ".* MSIE (.).*" && ($1 >= 6)) )
{
$body = $q->escape($body);
}
Regards
-- Alwin
-----Original Message-----
From: Yngve Svendsen [mailto:address@hidden
Sent: samedi, 12. octobre 2002 01:06
To: Dieperink Alwin; 'address@hidden'
Subject: Re: Patch for "send email to interested parties"
At 20:19 11.10.2002 +0200, Yngve Svendsen wrote:
>Netscape and IE handle URL quoting in different ways, and the patch would
>not work for Netscape browsers. I've spent a considerable amount of time
>devising a quoting mechanism that would work for both browsers but never
>got round to finishing it.
Thanks for getting me thinking about this again. I came up with the
following, which seems to work OK on the (many) browsers I've tested it on.
Testing has revealed that Netscape Navigator <= 4.x is the odd one out
here, since that is the only series of browsers which works with the old
way Gnatsweb quoted these URLs. This patch turns the situation around,
treating these browsers as special cases. Still, some 4.x releases have
bugs in their handling of this kind of URL, making a workaround for _all_
Netscape 4.x browsers impossible. This patch should take care of most of
them, though, while solving the problem completely for non-Netscape
browsers.
This has been committed to the v4 branch of Gnatsweb.
- Yngve
Index: gnatsweb.pl
===================================================================
RCS file: /cvsroot/gnatsweb/gnatsweb/gnatsweb.pl,v
retrieving revision 1.102
diff -u -p -r1.102 gnatsweb.pl
--- gnatsweb.pl 11 Oct 2002 21:09:36 -0000 1.102
+++ gnatsweb.pl 11 Oct 2002 22:54:53 -0000
@@ -1320,6 +1320,14 @@ sub get_mailto_link
my $subject = $q->escape("Re: $fields{$CATEGORY_FIELD}/$pr:
$fields{$SYNOPSIS_FIELD}");
my $body = $q->escape(get_viewpr_url($pr));
+ # Netscape Navigator up to and including 4.x should get the URL in
+ # the body encoded only once
+ unless ( ($ENV{'HTTP_USER_AGENT'} =~ "Mozilla\/(.)(.*)") && ($1 < 5)
+ && ($2 !=~ "compatible") )
+ {
+ $body = $q->escape($body);
+ }
+
my $reply = "<a
href=\"mailto:$int_mailto?Subject=$subject&Body=$body\">" .
"send email to interested parties</a>\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE: Patch for "send email to interested parties",
Dieperink Alwin <=