1

Topic: htmLawed OOP error?

Have been trying to incorporate the htmLawed class for filtering tinyMCE input. Irrespective of the config settings, the filter get's confused with html tags:

For example:
<h2>This is</h2> <p>an <em>additional</em> test</p>
becomes:
<h2>This is an <em>additional<em> test</em></em></h2>
and with balance 0 ends up as:
<h2>This is<h2> <p>an <em>additional<em> test<p>

This appears with an unmodified php file onto a standard Apache/PHP config. Have systematically gone through various possibilities to rectify the issue but with no success. It seems that if the config variable is changed on the initial function call [hl($t, $C=1, $S=array())] this causes a permanent error even if the value is reset back to 1 - this also happens using the htmLawedTest.php page!! Suspect it may be something to do with $GLOBALS['C'], but the dumped value appears correct.

Any suggestions greatly appreciated.

2

Re: htmLawed OOP error?

I tested the example input you provided: <h2>This is</h2> <p>an <em>additional</em> test</p>

But I am not seeing any problem with or without tag-balancing with the output on my htmLawed (OOP) test page at http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/test/htmLawedTest.php or on the non-OOP htmlawed test page at http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawedTest.php. Both test pages use the same PHP files that are in the htmLawed 1.1.9.5 (OOP or non-OOP) downloads on the htmLawed website. PHP version is 5.2.10 and Apache's is 2.

Still, may be it is an htmLawed bug that appears under certain conditions. Or, may be the issue you see is because of something else.