* htmlAutoCloseTag: * @doc: the HTML document * @name: The tag name * @elem: the HTML element * * The HTML DTD allows a tag to implicitly close other tags. * The list is kept in htmlStartClose array. This function checks * if the element or one of it's children would autoclose the * given tag. * * Returns 1 if autoclose, 0 otherwise */
| 1503 | * Returns 1 if autoclose, 0 otherwise |
| 1504 | */ |
| 1505 | int |
| 1506 | htmlAutoCloseTag(htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem) { |
| 1507 | htmlNodePtr child; |
| 1508 | |
| 1509 | if (elem == NULL) return(1); |
| 1510 | if (xmlStrEqual(name, elem->name)) return(0); |
| 1511 | if (htmlCheckAutoClose(elem->name, name)) return(1); |
| 1512 | child = elem->children; |
| 1513 | while (child != NULL) { |
| 1514 | if (htmlAutoCloseTag(doc, name, child)) return(1); |
| 1515 | child = child->next; |
| 1516 | } |
| 1517 | return(0); |
| 1518 | } |
| 1519 | |
| 1520 | /** |
| 1521 | * htmlIsAutoClosed: |
no test coverage detected