Menu

#136 Curly brackets cause unexpected behavior

closed
None
2018-12-06
2013-10-27
maya
No

Here is a HTML.

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

And this is a simple PHP script.

// PHP
$html = file_get_html('test.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

Discussion

  • json born

    json born - 2017-11-14

    +1 having same issue., anybody found a solution ?

     
  • LogMANOriginal

    LogMANOriginal - 2018-12-06

    This was recently fixed via [e60ffe]. The root cause for this issue is the Smarty script filter that was enabled by default.

     

    Related

    Commit: [e60ffe]

  • LogMANOriginal

    LogMANOriginal - 2018-12-06
    • status: open --> closed
    • assigned_to: LogMANOriginal
     

Log in to post a comment.