Issue #1 resolved

text() returns text outside of the element collection

Anonymous created an issue

According to the jQuery docs, the function text() returns only the text-content of an element. Its PyQuery counterpart returns both the text-content of the element and the content of any anonymous text nodes which are contained within the same parent and after the node.

I've attached a patch which corrects this.

Comments (3)

  1. Olivier Lauzanne repo owner

    Thanks for the bug report and the patch. Even if I had to do some more : the get_text method must return the anonymous text following the tag except for the first call (I noticed that thanks to the doctests that were broken by your patch). Anyway if you want write access just ask me. I'm all for open development.

  2. Log in to comment