FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18182&edit=1

ID: 18182
Comment by: vitalij
Reported By: COMP dot WORKMAIL at GMAIL dot COM
Summary: Problem with quotes in preg_replace
Status: Closed
Type: Bug
Package: HTML_QuickForm2
Operating System: Ubuntu
Package Version: 0.5.0
PHP Version: 5.3.1
Assigned To: avb
New Comment:

Hi! I still have this problem on my computer - I use the PHP 5.3.6-13
ubuntu 3.6 with Suhosin-Patch (cli) (built: Feb 11 2012 03:26:01)


Previous Comments:
------------------------------------------------------------------------

[2011-06-30 20:04:14] pagenotes

This bug is still in version 5.3.5, as packaged with XAMPP 1.7.4 on
Windows XP home edition. Even some very simple examples exhibit the
problem, e.g.,

$pattern = '/^[\w_-. ]+$/';
$uid = 'guest';
if (preg_match($pattern, $uid)) echo
("<style> p { text-decoration:line-through } </style>");

------------------------------------------------------------------------

[2011-01-11 22:11:07] avb

<div id="changeset">
<span class="removed">-Status: Assigned</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To: mansion</span>
<span class="added">+Assigned To: avb</span>
</div>Hierselect triggered this because it does appendChild() /
removeChild() in its render method.

I added a method to check for this to a unit test for Group class and
changed the provided fix a bit.

------------------------------------------------------------------------

[2011-01-11 14:01:16] helloworld

Sorry, I'm not explain so accurate.

If use simple group then all ok, but if use hierselect then we get this
problem.

I'm not find how attach file, so example below:

require_once('HTML/QuickForm2.php');
require_once('HTML/QuickForm2/Renderer.php');
$form = new HTML_QuickForm2('example');
$el = $form->addElement('hierselect', 'aa[c-b]', array('style' =>
'width: 300px;'), array('label' => 'Example', 'separator' => '<br/>'));
$el->loadOptions(array(
array('1', '2', '3'),
array( array('11','12','13'), array('21','22','23'),
array('31','32','33') )
));
$renderer = HTML_QuickForm2_Renderer::factory('default');
$form->render($renderer);
echo $renderer->getJavascriptBuilder()->getLibraries(true, true);
echo $renderer;

------------------------------------------------------------------------

[2011-01-10 10:08:34] mansion

<div id="changeset">
<span class="removed">-Status: Closed</span>
<span class="added">+Status: Open</span>
</div>Actually, I couldn't reproduce this, can you post an example
please ?

------------------------------------------------------------------------

[2011-01-10 09:56:14] mansion

<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: mansion</span>
</div>This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=18182

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 21, '12 at 6:28p
activeFeb 21, '12 at 6:28p
posts1
users1
websitepear.php.net

1 user in discussion

Vitalij: 1 post

People

Translate

site design / logo © 2022 Grokbase