PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Common » Bug #6221

HTML_Common::updateAttributes

Details

Submitted2005-12-11 14:39 UTC
Fromadriano dot php4 at gmail dot com
StatusBogus
PackageHTML_Common
PHP VersionIrrelevant
OSWindows XP Home
Roadmaps(Not assigned)

Comments

[2005-12-11 14:39 UTC] adriano dot php4 at gmail dot com

Description:
------------
Hello,
I am having a problem with the method updateAttributes, of the HTML_Common. When I use it in the HTML_QuickForm to modify the parameter action for something as "arq.php?action=I&t=4", seems that it applies the function htmlentities, and back in the form leaves thus: "arq.php?action=I&t=4". Exists some way to use this method without it to apply htmlentities?

Grateful,

Adriano

Test script:
---------------
$form->updateAttributes("action='?".$_SERVER["QUERY_STRING"]."'");

Expected result:
----------------
<form action="?modulo=usuarios&acao=alterar&TxtID=15"

Actual result:
--------------
<form action="?modulo=usuarios&acao=alterar&TxtID=15"

[2006-03-01 15:33 UTC] thesaur at php dot net

Could you confirm that this really is a bug? Iirc, HTML requires ampersands (&) to be escaped because they indicate special characters. At any rate, I tested this with IE and Firefox and both used the proper URL converting & to &.

[2006-03-07 08:27 UTC] mansion at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

HTML_Common escapes htmlentites for your own good.