php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12157 copying a single quote from MS word causes form variable to disappear.
Submitted: 2001-07-13 20:10 UTC Modified: 2001-10-18 15:41 UTC
From: eschmitt at greyzone dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.6 OS: red hat linux 6.1
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: eschmitt at greyzone dot com
New email:
PHP Version: OS:

 

 [2001-07-13 20:10 UTC] eschmitt at greyzone dot com
When copying a single quote from MS Word into a form field, with Content-Type set as ISO-8859-1 will cause some random form variables to disappear on the submission page.  I haven't been able to find a pattern to why this has happened.  There are several pages where it happens consistently, and some that it doesn't happen on.  The quote gets encoded as &#8217 when run through htmlspecialchars.  Each page has several hidden fields a couple text fields and text areas.  I couldn't write a small script to duplicate the problem.  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-16 07:49 UTC] zeev@php.net
Do you have a big script (but self-contained) that causes this problem?  Without some kind of a reproducing script, we can't do much about it.
 [2001-07-16 12:48 UTC] eschmitt at greyzone dot com
when the Content is: radio button is Plain Text the phase variable will be lost.  When it is set as HTML the phase variable works fine.

<html>
<head>
<title> Control Zone- Default Database</title>
<meta http-equiv="Refresh" content="1800; URL=/login.html?phase=logout">
<meta http-equiv="Content-Type" content="text/html" charset="ISO-8859-1">
<link rel="stylesheet" href="/layout/css/winie.css" media="screen">
<script language="JavaScript">
<!--
function doesAcceptCookie(){
	document.cookie = "test=cookieTest";
	var temp = document.cookie;
	if (!temp) window.location.replace("/cookieAlert.html");
}
//-->
</script>
</head>

<body bgcolor="#ffffff" background="/layout/graphics/sz4-1-bgrnd.gif" leftmargin="0" topmargin="0" marginwidth="0" 

marginheight="0" >

<pre>;
<?var_dump($HTTP_POST_VARS);?>
</pre>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td colspan="2" bgcolor="#999999"><img src="/layout/graphics/szlogo.gif" alt="Control Zone" width="207" 

height="59" border="0"></td>
	</tr>
	<tr>
		<td colspan="2" bgcolor="#ffffff"><img src="/layout/buttons/blank.gif" width="1" height="1"></td>
	</tr>	
	<tr>
		<td bgcolor="#FF0000" width="161" align="left"><img src="/layout/buttons/blank.gif" width="161" 

height="1" border="0"></td>
		<td bgcolor="#000000" width="100%">
		<div align="right">
		<a href="/index2.html" class="navcat">Home</a>
		&nbsp;
		<a href="/admin/search/search.html" class="navcat">Search</a>
		&nbsp;
				<a href="/login.html?phase=logout" class="navcat">Logout</a>
		&nbsp;
		&nbsp;
		&nbsp;
		</div>
		</td>
	</tr>	
	<tr>
		<td bgcolor="#ffffff" colspan="2"><img src="/layout/buttons/blank.gif" width="1" height="1"></td>
	</tr>	
</table>


<table border="0" cellpadding="0" cellspacing="0" width="765">
	<tr>
		<td valign="top" bgcolor="#CCCCCC">
			<img src="/layout/buttons/blank.gif" width="10" height="40"><br>
			<!-- BEGIN: SIDE BAR -->
			<table border="0" cellpadding="0" cellspacing="0" width="160">

				<tr>
					<td valign="top"><img src="/layout/buttons/navarrow.gif" border="0" 

width="5"></td>
					<td valign="top" width="200" colspan="2"><img src="/layout/buttons/blank.gif" 

height="5"><br>
					<!-- DEPTH 1 CATEGORY -->
					<a class="navcat" href="/cat.html?cat_id=1">SilkTests Cat</a><br>
					</td>
				</tr>
					

				<tr>
					<td colspan="3"><img src="/layout/buttons/blank.gif" width="10" height="3"></td>
				</tr>
				<tr>
					<td valign="top">&nbsp;</td>
					<td valign="top" width="150" colspan="2"><img src="/layout/buttons/blank.gif" 

width="10" height="5"><br><br><br>
					<!-- TOOL AREA -->
					<b class="navcat">Preferences</b><br>
					</td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/security/passwd.html" class="navsubcat">Password
</a></td>
				</tr>
				<tr>
					<td colspan="3"><img src="/layout/buttons/blank.gif" width="10" height="3"></td>
				</tr> 
				<tr>
					<td valign="top">&nbsp;</td>
					<td valign="top" width="150" colspan="2"><img src="/layout/buttons/blank.gif" 

width="10" height="5"><br>
					<!-- TOOL AREA -->
					<b class="navcat">Administration</b><br>
					</td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/groupMan/home.html" class="navsubcat">Group Manager</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/mailing_list/home.html" class="navsubcat">Mailing 

List</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/masking/home.html" class="navsubcat">Masking</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/search/index.html" class="navsubcat">Search Manager</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/userMan/home.html" class="navsubcat">User Manager</a></td>
				</tr>
 
				<tr>
					<td colspan="3"><img src="/layout/buttons/blank.gif" width="10" height="3"></td>
				</tr>
				<tr>
					<td valign="top">&nbsp;</td>
					<td valign="top" width="150" colspan="2"><img src="/layout/buttons/blank.gif" 

width="10" height="5"><br>
					<!-- TOOL AREA -->
					<b class="navcat">Content Management</b><br>
					</td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/bios/home.html" class="navsubcat">Bios</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/careers/home.html" class="navsubcat">Careers</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/lists/home.html" class="navsubcat">Case Studies</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/employee_directory/home.html" 

class="navsubcat">Directory</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/forum/home.html" class="navsubcat">Discussion 

Groups</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/event_calendar/home.html" class="navsubcat">Events</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/faq/home.html" class="navsubcat">Faq</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/downloads/home.html" class="navsubcat">Files</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/contact_form/home.html" class="navsubcat">Forms</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/doc_tool/home.html" class="navsubcat">Free-form 

Content</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/glossary/home.html" class="navsubcat">Glossary</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/home_content/home.html" class="navsubcat">Home 

Content</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/links/home.html" class="navsubcat">Links</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/dealers/home.html" class="navsubcat">Locations</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/announcements/home.html" class="navsubcat">News</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/support_guides/home.html" 

class="navsubcat">Products</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/tools/customer_quotes/home.html" class="navsubcat">Quotes</a></td>
				</tr>
 
				<tr>
					<td colspan="3"><img src="/layout/buttons/blank.gif" width="10" height="3"></td>
				</tr>
				<tr>
					<td valign="top">&nbsp;</td>
					<td valign="top" width="150" colspan="2"><img src="/layout/buttons/blank.gif" 

width="10" height="5"><br>
					<!-- TOOL AREA -->
					<b class="navcat">Publication</b><br>
					</td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/catTreeMan/home.html" class="navsubcat">Category 

Manager</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/admin_tools/prepub_manager.html" 

class="navsubcat">Prepublished Content</a></td>
				</tr>
				<tr>
					<td></td>
					<td valign="top"><img src="/layout/buttons/blank.gif" width="10" height="5"><br>
					<img src="/layout/buttons/navbullet.gif"></td>
					<td><a href="/admin/admin_tools/unpub_manager.html" 

class="navsubcat">Unpublished Content</a></td>
				</tr>
 
				<tr>
					<td colspan="3"><img src="/layout/buttons/blank.gif" width="10" height="3"></td>
				</tr>
			
			</table><br>
			<!-- END: SIDE BAR -->
		</td>
		<td valign="top" width="605">
			<table border="0" cellspacing="0" cellpadding="0" width="605">
				<tr>
					<td><img src="/layout/buttons/blank.gif" width="20" height="1"></td>
					<td valign="top" width="585">
					<!-- BEGIN: MAIN CONTENT AREA-->
					
					<!-- BEGIN: HEADLINE -->
					<table border="0" cellpadding="0" cellspacing="0">
						<tr> 
							<td bgcolor="#ffffff"><br>
							<a href="/tools/customer_quotes/home.html" 

class="trail">Quotes</a><b class="trail"> &gt; </b>							<b 

class="trail">Modify</b><b class="trail"> &gt; </b>							<p>&nbsp;</p>
							</td>
						</tr>
					</table>
					<!-- END: HEADLINE -->
	<p><a href="/admin/admin_tools/publish.html?tool_id=5&post_id=995049172">Modify Groups.</a>
	<br><a href="/admin/admin_tools/position.html?tool_id=5&post_id=995049172">Modify Categories.</a></p>
	<form method="post" action="<?echo $PHP_SELF;?>" enctype="multipart/form-data" >
	<input type="hidden" name="phase" value="modify quote">
	<input type="hidden" name="old_file" value="">
	<input type="hidden" name="linkname" value="No File on Record">
	<input type="hidden" name="override" value="">
	<input type="hidden" name="id" value="995049172">

	<table border="0" cellpadding="3" cellspacing="0">
		<tr>
			<td valign="top" align="right"><b>Name:</b></td> 
			<td valign="top" align="left"><input type="text" name="name" value="?" size="68" 

maxlength="255"></td>
		</tr>
		<tr>
			<td valign="top" align="right"><b>URL:</b></td> 
			<td valign="top" align="left"><input type="text" name="url" value="" size="68" 

maxlength="255"></td>
		</tr>
		<tr>
			<td valign="top" align="right"><b>Quote:</b></td>	
			<td valign="top" align="left"><textarea name="quotation" cols="58.5" rows="10" 

wrap="virtual">?</textarea></td>
		</tr>
		<tr>
			<td valign="top" align="right"><b>Current File:&nbsp;</b></td>
			<td valign="top" align="left"><b><i>No File on Record</i></b><br>
							<input type="file" name="upfile">
						</td>	
		</tr>
		<tr>
			<td valign="top" align="right"><b>File Type:</b></td>
			<td valign="top" align="left">
				<select name="filetype">
					<option value="" selected>&nbsp;</option>
					<option value="D">Downloadable File</option>
					<option value="I">Image</option>
				</select>
			</td>
		</tr>
		<tr>
			<td align="right" valign="top"><b>Content is:</b></td>
			<td align="left" valign="top">
			<input type="radio" name="contentType" value="T" checked>
				Plain Text<br>
			<input type="radio" name="contentType" value="H">
				HTML
			</td>
		</tr>
		<tr>
			<td valign="top" align="right">&nbsp;</td>
			<td valign="top" align="left"><input type="submit" value=" Modify -&gt; "></td>
		</tr>
	</table>
	</form>

					<!-- END: MAIN CONTENT AREA-->
					</td>
				</tr>
			</table>
		<br><br>
		</td>
	</tr>
</table>

</body>
</html>

 [2001-10-18 15:41 UTC] sander@php.net
Unable to reproduce using the following code:
<?var_dump($HTTP_POST_VARS);?>
<form method="post" action="<?echo $PHP_SELF;?>"
<input type="text" name="name" value="?">
<input type="submit">

Copy'ing and pasting strange quotes from Word to Internet Explorer works normally...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 06:01:29 2025 UTC