php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7846 Single quotes replaced by double quotes only if cookies are not accepted
Submitted: 2000-11-16 11:33 UTC Modified: 2000-11-20 06:57 UTC
From: s dot meier at comcity dot de Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.3pl1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: s dot meier at comcity dot de
New email:
PHP Version: OS:

 

 [2000-11-16 11:33 UTC] s dot meier at comcity dot de
in the following script


<?
	session_register("CookiesAktiviert");
	$CookiesAktiviert=1;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Test</title>
</head>

<body>

	<a href='javascript:alert("Hallo Stefan");'>Hallo Stefan</a>

</body>
</html>



the single quotes in the href are replaced by double quotes, if the user does not 
accept cookies. If he accepts the cookie set by the session_register function and
then reloads the file (because the seesion-id has already has been written, this
time the function session_register doesen't try to set a cookie), the single quotes 
are not replaced (which is the desired behaviour).

magic_quotes_gpc = 1
magic_quotes_runtime = 0


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-17 12:06 UTC] sniper@php.net
reclassified as session related.
 [2000-11-19 12:04 UTC] stas@php.net
Do you have trans-sid feature enabled?
 [2000-11-20 06:57 UTC] hholzgra@php.net
Sascha has already fixed this in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 11:00:01 2026 UTC