This fixes two issues involved with missing popup (legacy <extra>) content. First, popup content may be specified in the <extra> element content without being wrapped in a semantic subelement like meaning or translation. This case was not being handled.
Second, standard content manipulations to strip bad nested HTML, for example to strip an unordered list within a paragraph, were using selectors that reached down into all descendants. So if a paragraph contained text with an extra (popup) that contained structured content like an unordered list, the nested list level would be stripped because it is contained within a paragraph, leading to incorrect content in the popups. This change revises the selectors to reach only immediate children.
This fixes two issues involved with missing popup (legacy
<extra>
) content. First, popup content may be specified in the<extra>
element content without being wrapped in a semantic subelement like meaning or translation. This case was not being handled.Second, standard content manipulations to strip bad nested HTML, for example to strip an unordered list within a paragraph, were using selectors that reached down into all descendants. So if a paragraph contained text with an extra (popup) that contained structured content like an unordered list, the nested list level would be stripped because it is contained within a paragraph, leading to incorrect content in the popups. This change revises the selectors to reach only immediate children.