1 (edited by nicholas.alipaz 2011-10-21 01:09:18)

Topic: HTML returning empty string after filtering

In regards to: http://www.bioinformatics.org/phplabwar … php?id=178

I kind of dropped off.  But need to revisit this.  It does not seem that it is related to magic quotes.  I do have this code running before processing:

  include_once 'htmLawed.php';
  $body = (get_magic_quotes_gpc()) ? stripslashes($html_document->body) : $html_document->body;
  $body = htmLawed($body, $config);

However it does not make a difference.  I get an empty string returned.  Testing my same source code referenced in the aforementioned post using the online tester you can see that it returns an empty string whenever tidy is set to 1 or format

2

Re: HTML returning empty string after filtering

I fail to see an issue when I try the 'tidy' setting of '1' or 'format' on the htmLawed test page for input

<img title="images" src="/contentimages/image.png" alt="image" width="32" height="32" />

Can you provide me some other input text to test?

3 (edited by nicholas.alipaz 2011-10-22 00:01:42)

Re: HTML returning empty string after filtering

Try this: http://pastebin.com/URw9wRq1.  I think it may be due to the brackets in the

<input>

elements.

4

Re: HTML returning empty string after filtering

Thanks for the suggested input. Yes, with 'tidy' enabled, I too get an empty output.

This is very weird. I fiddled with the input text to identify the culprit segment (or element sequence, etc.) , and find that the following input string when in tandem (repeated) 9 times too gives the empty output (actually, a single space), but when in tandem only 8 times does not!

<label></label><textarea ></textarea></div></div><div><input /></div></div></form><div><ul><li></li></ul></div><div><div><ul><li></li>

I will look into this more. This may be because of some logical error on the second line of the code for function 'hl_tidy'.

5

Re: HTML returning empty string after filtering

I believe the issue is now fixed in the latest release of htmLawed (1.1.10, 22 October 2011).

6

Re: HTML returning empty string after filtering

This did fix it for me.  Thanks so much for looking into it.

Best!