Update1: with full source code:
$html1 = '<div class="pubanunciomrec" style="background:#FFFFFF;"><script type="text/javascript">
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>';
$doc = phpQuery::newDocument($html1);
$html1 = $doc->remove('script');
echo $html1;
The source code is above. I also read that there is an error, http://code.google.com/p/phpquery/issues/detail?id=150 I do not know if this is allowed.
Any tips on how to remove <script> from this HTML?
Regards,
Hi,
I need to remove <script> tags from an HTML document using PhpQuery.
I have done the following:
$doc = phpQuery::newDocument($html);
$html = $doc['script']->remove();
echo $html;
It does not remove tags and <script> content. Can this be done using PhpQuery?
Regards,
André source
share