#61581 closed defect (bug) (fixed)
HTML Processor should respect `tag_name` argument in `next_tag()`
Reported by: | dmsnell | Owned by: | dmsnell |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | 6.4 |
Component: | HTML API | Keywords: | has-patch needs-dev-note |
Focuses: | Cc: |
Description
The HTML Processor currently ignores the tag_name
provided if provided in its array form.
<?php $processor->next_tag( array( 'tag_name' => 'DIV' ) );
It returns the next tag regardless of its name. It should instead continue scanning until it finds a tag of the given name or reaches the end of the document.
Change History (5)
Note: See
TracTickets for help on using
tickets.
Trac ticket: Core-61581
Previously the HTML Processor was ignoring the
tag_name
argument in thenext_tag()
query if it existed. This was wrong adn would lead to calling code finding the very next tag, regardless of tag name, instead of the requested taag.This patch adds the tag name detection code into
next_tag()
to fix the bug and ensure thatnext_tag()
always returns only when finding a tag of the given name.Follow-up to [56274].