sunra / php-simple-html-dom-parser

PHP Simple HTML DOM Parser adaptation for Composer and PSR-0
1.3k stars 352 forks source link

Curly brackets cause unexpected behavior #53

Open ghost opened 7 years ago

ghost commented 7 years ago

this is a simple PHP script

<?php
$html = HtmlDomParser::str_get_html('<html><body><span>a</span><span>{b</span><span>c}</span><span>d</span></body></html>');

foreach ($html->find('span') as $v) {
    echo $v->innertext."\n";
}
?>

I expected follwings:

A
{b
c}
d

But result is follwings:

a
{b</span><span>c}
d