#141 wrong find results when querying multiple comma separated items

v1.0_(example)
open
nobody
None
1
2014-08-26
2014-08-12
cyberbeat
No

My test document:

<html>

  • 1

  • <lo>2</lo>
  • 3

  • 4

  • <lo>5</lo>
  • 6

  • </html>

    My Test Script:

    require("wasgehtinkiel/inc/simple_html_dom.php");

    $html = file_get_html("test.html");

    echo "not ok:
    ";
    foreach ($html->find("li, lo a") as $el){
    echo $el->tag."
    ";
    }

    echo "ok:
    ";
    foreach ($html->find("lo a") as $el){
    echo $el->tag."
    ";
    }

    ?>

    The result:

    not ok:
    li
    lo
    li
    li
    lo
    li

    ok:
    a
    a

    What is wrong: in the first loop, the output should be

    li
    a
    li
    li
    a
    li

    Discussion

    • cyberbeat
      cyberbeat
      2014-08-12

      sourceforge scraped my html, another try:

      <html>
      <li>1</li>
      <lo><a>2</a></lo>
      <li>3</li>
      <li>4</li>
      <lo><a>5</a></lo>
      <li>6</li>

      </html>