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

ID: 16510
Updated by: daniel.oconnor@gmail.com
Reported By: demrit at mx dot gnu dot org
Summary: HTML_Safe for PHP 5.3 strict
Status: Open
Type: Feature/Change Request
Package: HTML_Safe
Operating System: Any
Package Version: CVS
PHP Version: 5.3.0
Roadmap Versions:
New Comment:

1) Avoid the use of private (protected is your friend) - it's harder to
extend, test, etc.

2) Since things now have scope, we can lose the _ prefixes

Ie, var $_listScope can become protected $listScope

3) Some of the things used to be public, ie:

* @var array
- * @access public
*/
- var $closeParagraph = array(
+ private $_closeParagraph = array(
'address', 'blockquote', 'center', 'dd', 'dir',
'div',
'dl', 'dt', 'h1', 'h2', 'h3',
'h4',
'h5', 'h6', 'hr', 'isindex', 'listing',
'marquee',
'menu', 'multicol', 'ol', 'p', 'plaintext',
'pre',
'table', 'ul', 'xmp',
- );
+ );

4) Oh dear, no one has put this in SVN.


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

[2009-08-10 19:13:04] demrit

The following patch has been added/updated:

Patch Name: upgrade-support
Revision: 1249927984
URL:
http://pear.php.net/bugs/patch-display.php?bug=16510&patch=upgrade-support&revision=1249927984&display=1

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

[2009-08-10 19:12:43] demrit

Description:
------------
Now package have 5.3 E_STRICT support and allow tags has been added,
using setAllowTags() method.

Test script:
---------------
$doc = '<html><body><p>my text</p></body></html>';

$safe = new HTML_Safe;
$safe->setAllowTags(array('body'));
$doc = $safe->parse($doc);

Expected result:
----------------
<body><p>my text</p></body>

Actual result:
--------------
<p>my text</p>

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

Search Discussions

  • Daniel Oconnor at Aug 11, 2009 at 12:36 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16510&edit=1

    ID: 16510
    Updated by: daniel.oconnor@gmail.com
    Reported By: demrit at mx dot gnu dot org
    Summary: HTML_Safe for PHP 5.3 strict
    Status: Open
    Type: Feature/Change Request
    Package: HTML_Safe
    Operating System: Any
    Package Version: CVS
    PHP Version: 5.3.0
    Roadmap Versions:
    New Comment:

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?


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

    [2009-08-11 02:36:12] doconnor

    1) Avoid the use of private (protected is your friend) - it's harder to
    extend, test, etc.

    2) Since things now have scope, we can lose the _ prefixes

    Ie, var $_listScope can become protected $listScope

    3) Some of the things used to be public, ie:

    * @var array
    - * @access public
    */
    - var $closeParagraph = array(
    + private $_closeParagraph = array(
    'address', 'blockquote', 'center', 'dd', 'dir',
    'div',
    'dl', 'dt', 'h1', 'h2', 'h3',
    'h4',
    'h5', 'h6', 'hr', 'isindex', 'listing',
    'marquee',
    'menu', 'multicol', 'ol', 'p', 'plaintext',
    'pre',
    'table', 'ul', 'xmp',
    - );
    + );

    4) Oh dear, no one has put this in SVN.

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

    [2009-08-10 19:13:04] demrit

    The following patch has been added/updated:

    Patch Name: upgrade-support
    Revision: 1249927984
    URL:
    http://pear.php.net/bugs/patch-display.php?bug=16510&patch=upgrade-support&revision=1249927984&display=1

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

    [2009-08-10 19:12:43] demrit

    Description:
    ------------
    Now package have 5.3 E_STRICT support and allow tags has been added,
    using setAllowTags() method.

    Test script:
    ---------------
    $doc = '<html><body><p>my text</p></body></html>';

    $safe = new HTML_Safe;
    $safe->setAllowTags(array('body'));
    $doc = $safe->parse($doc);

    Expected result:
    ----------------
    <body><p>my text</p></body>

    Actual result:
    --------------
    <p>my text</p>

    ------------------------------------------------------------------------
  • Daniel Oconnor at Aug 11, 2009 at 12:39 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16510&edit=1

    ID: 16510
    Updated by: daniel.oconnor@gmail.com
    Reported By: demrit at mx dot gnu dot org
    Summary: HTML_Safe for PHP 5.3 strict
    Status: Open
    Type: Feature/Change Request
    Package: HTML_Safe
    Operating System: Any
    Package Version: CVS
    PHP Version: 5.3.0
    Roadmap Versions:
    New Comment:

    Alrighty Miguel, I've added a copy of the last release to SVN.

    svn checkout
    http://svn.php.net/repository/pear/packages/HTML_Safe/trunk

    should work


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

    [2009-08-11 02:36:37] doconnor

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?

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

    [2009-08-11 02:36:12] doconnor

    1) Avoid the use of private (protected is your friend) - it's harder to
    extend, test, etc.

    2) Since things now have scope, we can lose the _ prefixes

    Ie, var $_listScope can become protected $listScope

    3) Some of the things used to be public, ie:

    * @var array
    - * @access public
    */
    - var $closeParagraph = array(
    + private $_closeParagraph = array(
    'address', 'blockquote', 'center', 'dd', 'dir',
    'div',
    'dl', 'dt', 'h1', 'h2', 'h3',
    'h4',
    'h5', 'h6', 'hr', 'isindex', 'listing',
    'marquee',
    'menu', 'multicol', 'ol', 'p', 'plaintext',
    'pre',
    'table', 'ul', 'xmp',
    - );
    + );

    4) Oh dear, no one has put this in SVN.

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

    [2009-08-10 19:13:04] demrit

    The following patch has been added/updated:

    Patch Name: upgrade-support
    Revision: 1249927984
    URL:
    http://pear.php.net/bugs/patch-display.php?bug=16510&patch=upgrade-support&revision=1249927984&display=1

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

    [2009-08-10 19:12:43] demrit

    Description:
    ------------
    Now package have 5.3 E_STRICT support and allow tags has been added,
    using setAllowTags() method.

    Test script:
    ---------------
    $doc = '<html><body><p>my text</p></body></html>';

    $safe = new HTML_Safe;
    $safe->setAllowTags(array('body'));
    $doc = $safe->parse($doc);

    Expected result:
    ----------------
    <body><p>my text</p></body>

    Actual result:
    --------------
    <p>my text</p>

    ------------------------------------------------------------------------
  • Daniel Oconnor at Aug 11, 2009 at 1:00 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16510&edit=1

    ID: 16510
    Updated by: daniel.oconnor@gmail.com
    Reported By: demrit at mx dot gnu dot org
    Summary: HTML_Safe for PHP 5.3 strict
    Status: Open
    Type: Feature/Change Request
    Package: HTML_Safe
    Operating System: Any
    Package Version: CVS
    PHP Version: 5.3.0
    Roadmap Versions:
    New Comment:

    [287069] adds a stub of the allow tags method - test coverage too, but
    no actual implementation.


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

    [2009-08-11 02:39:41] doconnor

    Alrighty Miguel, I've added a copy of the last release to SVN.

    svn checkout
    http://svn.php.net/repository/pear/packages/HTML_Safe/trunk

    should work

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

    [2009-08-11 02:36:37] doconnor

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?

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

    [2009-08-11 02:36:12] doconnor

    1) Avoid the use of private (protected is your friend) - it's harder to
    extend, test, etc.

    2) Since things now have scope, we can lose the _ prefixes

    Ie, var $_listScope can become protected $listScope

    3) Some of the things used to be public, ie:

    * @var array
    - * @access public
    */
    - var $closeParagraph = array(
    + private $_closeParagraph = array(
    'address', 'blockquote', 'center', 'dd', 'dir',
    'div',
    'dl', 'dt', 'h1', 'h2', 'h3',
    'h4',
    'h5', 'h6', 'hr', 'isindex', 'listing',
    'marquee',
    'menu', 'multicol', 'ol', 'p', 'plaintext',
    'pre',
    'table', 'ul', 'xmp',
    - );
    + );

    4) Oh dear, no one has put this in SVN.

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

    [2009-08-10 19:13:04] demrit

    The following patch has been added/updated:

    Patch Name: upgrade-support
    Revision: 1249927984
    URL:
    http://pear.php.net/bugs/patch-display.php?bug=16510&patch=upgrade-support&revision=1249927984&display=1

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

    [2009-08-10 19:12:43] demrit

    Description:
    ------------
    Now package have 5.3 E_STRICT support and allow tags has been added,
    using setAllowTags() method.

    Test script:
    ---------------
    $doc = '<html><body><p>my text</p></body></html>';

    $safe = new HTML_Safe;
    $safe->setAllowTags(array('body'));
    $doc = $safe->parse($doc);

    Expected result:
    ----------------
    <body><p>my text</p></body>

    Actual result:
    --------------
    <p>my text</p>

    ------------------------------------------------------------------------
  • Demrit at Aug 11, 2009 at 7:17 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16510&edit=1

    ID: 16510
    Updated by: demrit@mx.gnu.org
    Reported By: demrit at mx dot gnu dot org
    Summary: HTML_Safe for PHP 5.3 strict
    Status: Open
    Type: Feature/Change Request
    Package: HTML_Safe
    Operating System: Any
    Package Version: CVS
    PHP Version: 5.3.0
    Roadmap Versions:
    New Comment:

    1) Avoid the use of private (protected is your friend) - it's harder to
    extend, test, etc.

    Agree and changed. Everything private has been moved to protected.

    2) Since things now have scope, we can lose the _ prefixes Ie, var

    done

    3) Some of the things used to be public, ie:

    hmm, i think it must be access by get/set methods, but for now it is
    ok. Everything handle has been changed from private to public because
    third party package requires (HTMLSax3).

    4) Oh dear, no one has put this in SVN.

    Ah, well I have a patch again for the source that you provides.

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?

    I will do it with my new code for stable version before. First it and
    use the current unit.


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

    [2009-08-11 03:00:15] doconnor

    [287069] adds a stub of the allow tags method - test coverage too, but
    no actual implementation.

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

    [2009-08-11 02:39:41] doconnor

    Alrighty Miguel, I've added a copy of the last release to SVN.

    svn checkout
    http://svn.php.net/repository/pear/packages/HTML_Safe/trunk

    should work

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

    [2009-08-11 02:36:37] doconnor

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?

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

    [2009-08-11 02:36:12] doconnor

    1) Avoid the use of private (protected is your friend) - it's harder to
    extend, test, etc.

    2) Since things now have scope, we can lose the _ prefixes

    Ie, var $_listScope can become protected $listScope

    3) Some of the things used to be public, ie:

    * @var array
    - * @access public
    */
    - var $closeParagraph = array(
    + private $_closeParagraph = array(
    'address', 'blockquote', 'center', 'dd', 'dir',
    'div',
    'dl', 'dt', 'h1', 'h2', 'h3',
    'h4',
    'h5', 'h6', 'hr', 'isindex', 'listing',
    'marquee',
    'menu', 'multicol', 'ol', 'p', 'plaintext',
    'pre',
    'table', 'ul', 'xmp',
    - );
    + );

    4) Oh dear, no one has put this in SVN.

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

    [2009-08-10 19:13:04] demrit

    The following patch has been added/updated:

    Patch Name: upgrade-support
    Revision: 1249927984
    URL:
    http://pear.php.net/bugs/patch-display.php?bug=16510&patch=upgrade-support&revision=1249927984&display=1

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

    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=16510
  • Demrit at Aug 24, 2009 at 6:37 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16510&edit=1

    ID: 16510
    Updated by: demrit@php.net
    Reported By: demrit at mx dot gnu dot org
    Summary: HTML_Safe for PHP 5.3 strict
    Status: Open
    Type: Feature/Change Request
    Package: HTML_Safe
    Operating System: Any
    Package Version: CVS
    PHP Version: 5.3.0
    -Assigned To:
    +Assigned To: demrit
    Roadmap Versions:
    New Comment:

    -Assigned To:
    +Assigned To: demrit



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

    [2009-08-11 09:18:16] demrit

    The following patch has been added/updated:

    Patch Name: 53support
    Revision: 1249978696
    URL:
    http://pear.php.net/bugs/patch-display.php?bug=16510&patch=53support&revision=1249978696&display=1

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

    [2009-08-11 09:17:11] demrit

    1) Avoid the use of private (protected is your friend) - it's harder to
    extend, test, etc.

    Agree and changed. Everything private has been moved to protected.

    2) Since things now have scope, we can lose the _ prefixes Ie, var

    done

    3) Some of the things used to be public, ie:

    hmm, i think it must be access by get/set methods, but for now it is
    ok. Everything handle has been changed from private to public because
    third party package requires (HTMLSax3).

    4) Oh dear, no one has put this in SVN.

    Ah, well I have a patch again for the source that you provides.

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?

    I will do it with my new code for stable version before. First it and
    use the current unit.

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

    [2009-08-11 03:00:15] doconnor

    [287069] adds a stub of the allow tags method - test coverage too, but
    no actual implementation.

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

    [2009-08-11 02:39:41] doconnor

    Alrighty Miguel, I've added a copy of the last release to SVN.

    svn checkout
    http://svn.php.net/repository/pear/packages/HTML_Safe/trunk

    should work

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

    [2009-08-11 02:36:37] doconnor

    5) I don't suppose there's any chance of unit test coverage *before*
    you refactor, to catch any mistakes?

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

    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=16510

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 11, '09 at 12:36a
activeAug 24, '09 at 6:37a
posts6
users3
websitepear.php.net

3 users in discussion

Daniel Oconnor: 4 posts Demrit: 1 post Demrit: 1 post

People

Translate

site design / logo © 2022 Grokbase