php-simple-html-dom-parser icon indicating copy to clipboard operation
php-simple-html-dom-parser copied to clipboard

simple_html_dom_node::text() method is abnormal with embed tag

Open taobig opened this issue 8 years ago • 0 comments

Example code

$content = "<div class=test><embed src='http://....swf' quality='high' width='480' height='400' align='middle' allowScriptAccess='always' allowFullScreen='true' mode='transparent' type='application/x-shockwave-flash'></embed></div>";
$dom = HtmlDomParser::str_get_html($content);
$newsContent = $dom->find(".test", 0)->text();
var_dump(newsContent);

Expected result: string(0) "" Result: string(8) "</embed>"

taobig avatar Jun 03 '17 05:06 taobig