Incorrect search for <legend> tags

It looked for a `legend` attribute instead of the `legend` tag.
Merge pull request #1 from fizker/patch-1

Incorrect search for <legend> tags