cvs: pear /Pager Common.php package.xml
| From: | Lorenzo Alberton | Date: | Fri, 20 Jan 2006 13:42:00 +0000 |
| Subject: | cvs: pear /Pager Common.php package.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-37665@lists.php.net to get a copy of this message | ||
quipo Fri Jan 20 13:42:00 2006 UTC
Modified files:
/pear/Pager Common.php package.xml
Log:
fixed bug #6529: form with field containing value with single-quote
http://cvs.php.net/viewcvs.cgi/pear/Pager/Common.php?r1=1.43&r2=1.44&diff_format=u
Index: pear/Pager/Common.php
diff -u pear/Pager/Common.php:1.43 pear/Pager/Common.php:1.44
--- pear/Pager/Common.php:1.43 Tue Nov 29 17:51:24 2005
+++ pear/Pager/Common.php Fri Jan 20 13:42:00 2006
@@ -31,9 +31,9 @@
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>
- * @copyright 2003-2005 Lorenzo Alberton, Richard Heyes
+ * @copyright 2003-2006 Lorenzo Alberton, Richard Heyes
* @license http://www.debian.org/misc/bsd.license BSD
License (3 Clause)
- * @version CVS: $Id: Common.php,v 1.43 2005/11/29 17:51:24 quipo Exp $
+ * @version CVS: $Id: Common.php,v 1.44 2006/01/20 13:42:00 quipo Exp $
* @link http://pear.php.net/package/Pager
*/
@@ -672,7 +672,7 @@
);
}
if ($this->_httpMethod == 'POST') {
- return sprintf("<a href='javascript:%s'%s
title='%s'>%s</a>",
+ return sprintf("<a href='javascript:void(0)' onClick='%s'%s
title='%s'>%s</a>",
$this->_generateFormOnClick($this->_url, $this->_linkData),
empty($this->_classString) ? '' : '
'.$this->_classString,
$altText,
@@ -736,7 +736,7 @@
$str .=
'document.getElementsByTagName("body")[0].appendChild(form);';
}
- $str .= 'form.submit();';
+ $str .= 'form.submit(); return false;';
return $str;
}
@@ -770,7 +770,7 @@
$escapedData = str_replace($search, $replace, $data);
// am I forgetting any dangerous whitespace?
// would a regex be faster?
- $escapedData = htmlentities($escapedData);
+ $escapedData = htmlentities($escapedData, ENT_QUOTES);
$str .= 'input = document.createElement("input"); ';
$str .= 'input.type = "hidden"; ';
http://cvs.php.net/viewcvs.cgi/pear/Pager/package.xml?r1=1.60&r2=1.61&diff_format=u
Index: pear/Pager/package.xml
diff -u pear/Pager/package.xml:1.60 pear/Pager/package.xml:1.61
--- pear/Pager/package.xml:1.60 Tue Nov 29 17:55:38 2005
+++ pear/Pager/package.xml Fri Jan 20 13:42:00 2006
@@ -26,13 +26,14 @@
<release>
<version>2.3.5</version>
- <date>2005-11-29</date>
+ <date>2006-01-20</date>
<state>stable</state>
<notes>
<![CDATA[
- remove flicker (caused by href="#") during POST requests (request #6005)
- added "formID" option to reuse an existing form in POST requests
(thanks to Marc Veldman)
+- fixed bug #6529: problem with fields with quotes during POST requests
]]>
</notes>
@@ -77,13 +78,14 @@
<changelog>
<release>
<version>2.3.5</version>
- <date>2005-11-29</date>
+ <date>2006-01-20</date>
<state>stable</state>
<notes>
<![CDATA[
- remove flicker (caused by href="#") during POST requests (request #6005)
- added "formID" option to reuse an existing form in POST requests
(thanks to Marc Veldman)
+- fixed bug #6529: problem with fields with quotes during POST requests
]]>
</notes>
</release>