REFRESH meta tag doesn't work if URL has quotes

VERIFIED FIXED in M14

Status

()

Core
Networking
P3
normal
VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: Chris Kistner, Assigned: Judson Valeski)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

18 years ago
When you try to use the normal meta direction html the browser does not redirect
the user to the wanted page. This is a problem since many pages use this normal
HTML tag to move users to another site.

Updated

18 years ago
Summary: Browser doesn't redirect user → REFRESH meta tag doesn't work

Comment 1

18 years ago
This doesn't work in Netscape 4.7 either.  I think the reason is simply that
there are single quotes around the URL.
(Reporter)

Comment 2

18 years ago
I've tried it in Netscape 4.7 and it always works? I don't get it. I'm giving 
you another example: http://www.progar.com/about/ that should take you to 
http://www.progar.com/amasoft/about.shtml. But it doesn't take you any wheres. 
This is a problem for me because I own Progar.com and in Progar.com i run a few 
search engines. I've tied in user querys by simply using a CGI that prints out a 
redriection here it is:
It has always worked in Netscape 2.x Netscape 3.x and 4.x I've even tried it in 
IE 3.x, 4.x, and in 5.x it should work

#!/usr/bin/perl
#
###################################
#	Amasoft Search Query        #
#        Dec. 1999                #
#      Chris Kistner              #
###################################
#Chomd the following to 755
#####################################


############## Decode all incoming information ##############
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
          @pairs = split(/&/, $buffer);
          foreach $pair (@pairs) {
              ($name, $value) = split(/=/, $pair);
              $FORM{$name} = $value;
          }


if ($FORM{'select'} eq "Search")
	{&search;}

elsif ($FORM{'select'} eq "Downloads")
	{&downloads;}

elsif ($FORM{'select'} eq "Compilers")
	{&compilers;}

elsif ($FORM{'select'} eq "Tutorials")
	{&tutorials;}

elsif($FORM{'select'} eq "Source")
	{&source;}
else
	{&error;}
############################ Subs ###########################
sub search
{
print "Content-type: text/html\n\n";
print "<html>";
print "<meta http-equiv=\"REFRESH\" 
content=\"0\;URL=\'http://www.progar.com/search/cgi-bin/search.cgi?action=search
&query=$FORM{'query'}\'\">";
print "</html>";
}

sub downloads
{

print "Content-type: text/html\n\n";
print "<html>";
print "<meta http-equiv=\"REFRESH\" 
content=\"0\;URL=\'http://www.progar.com/downloads/cgi-bin/search.cgi?action=sea
rch&query=$FORM{'query'}\'\">";
print "</html>";
}

sub compilers
{
print "Content-type: text/html\n\n";
print "<html>";
print "<meta http-equiv=\"REFRESH\" 
content=\"0\;URL=\'http://www.progar.com/compilers/cgi-bin/search.cgi?action=sea
rch&query=$FORM{'query'}\'\">";
print "</html>";

}

sub tutorials
{
print "Content-type: text/html\n\n";
print "<html>";
print "<meta http-equiv=\"REFRESH\" 
content=\"0\;URL=\'http://www.progar.com/tutorials/cgi-bin/search.cgi?action=sea
rch&query=$FORM{'query'}\'\">";
print "</html>";
}

sub source
{
print "Content-type: text/html\n\n";
print "<html>";
print "<meta http-equiv=\"REFRESH\" 
content=\"0\;URL=\'http://www.progar.com/source/cgi-bin/search.cgi?action=search
&query=$FORM{'query'}\'\">";
print "</html>";

}

sub error
{
print "Content-type: text/html\n\n";
print "Sorry there has been a serious problem with our Search Program.\nWe will 
fix this shortly. Sorry, Try again soon!";
 
}
######################### End of CGI #######################

I hope this helps to prove that this is a very big bug!

Comment 3

18 years ago
This looks like a dupe of bug 10720. Which is marked Verified Fixed. However
http://www.prograr.com/about/ does not work for me on WinNT build M13
(2000012520). Maybe there is something in the way the HTML is written?

Assigning to networking with the same Assignee and QA contact as bug 10720.

HTML code:
<html>
<head>
   <meta http-equiv="REFRESH"
content="0;URL='http://www.progar.com/amasoft/about.shtml'">
   <title>Amasoft About</title>
</head>
</html>

Expected Result when loading (Verified that Netscape 4.x does this):
Load http://www.progar.com/amasoft/about.shtml

Actual Result:
Mozilla sits on http://www.progar.com/about/
ignoring the META REFRESH tag.


Assignee: rickg → valeski
Component: HTML Element → Networking
QA Contact: petersen → paulmac

Comment 4

18 years ago
As I pointed out before: An easy workaround is to remove the single quotes
around the URL in the content tag, i.e.,

<meta http-equiv="REFRESH"
content="0;URL=http://www.progar.com/amasoft/about.shtml">

instead of

<meta http-equiv="REFRESH"
content="0;URL='http://www.progar.com/amasoft/about.shtml'">

Reported in bug 26370: A double quote at the beginning of the REFRESH URL is not
removed.  See eg, http://www.sigov.si/zmar/arhiv/curogl.html which has 

<META http-equiv=Refresh content=3;URL="og1199/eosl1199.html">

and should redirect to http://www.sigov.si/zmar/arhiv/og1199/eosl1199.html, but
instead redirects to http://www.sigov.si/zmar/arhiv/"og1199/eosl1199.html

Proposed fix: remove all kinds of quotes around URLs in META REFRESH tags.

(Wondering if quotes around URLs are allowed as per HTML RFC?)
Summary: REFRESH meta tag doesn't work → REFRESH meta tag doesn't work if URL has quotes

Comment 5

18 years ago
*** Bug 26370 has been marked as a duplicate of this bug. ***

Comment 6

18 years ago
cc:ing rickg, this might be a parser issue

Comment 7

18 years ago
*** Bug 26534 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 8

18 years ago
This may have gone away with the URI parsing changes that landed two nights ago.
Status: NEW → ASSIGNED
Target Milestone: M14

Comment 9

18 years ago
The single quotes problem is still here on Linux build 2000.02.04.08.  The
initial double quote problem now redirects
<META http-equiv=Refresh content=3;URL="og1199/eosl1199.html">
to
http://www.sigov.si/zmar/arhiv/%22og1199/eosl1199.html
instead of
http://www.sigov.si/zmar/arhiv/"og1199/eosl1199.html
(Assignee)

Comment 10

18 years ago
fix just checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 11

18 years ago
Verified on Linux build 2000.02.05.08.
Status: RESOLVED → VERIFIED

Comment 12

18 years ago
*** Bug 28198 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.