Don't detect comments within 'cite' elements too

Follow-up to 024a978ffd.

Bug: T275881
Change-Id: I53448ad22cd0531e7fd4aa0ea5d15782879cce14
This commit is contained in:
Bartosz Dziewoński 2021-03-01 21:40:21 +01:00
parent 6650eb56cd
commit f5059e6ea6
2 changed files with 2 additions and 0 deletions

View file

@ -672,6 +672,7 @@ class CommentParser {
// Don't detect comments within quotes (T275881)
if ( $node instanceof DOMElement && (
strtolower( $node->tagName ) === 'blockquote' ||
strtolower( $node->tagName ) === 'cite' ||
strtolower( $node->tagName ) === 'q'
) ) {
return NodeFilter::FILTER_REJECT;

View file

@ -423,6 +423,7 @@ function acceptOnlyNodesAllowingComments( node ) {
// Don't detect comments within quotes (T275881)
if ( node instanceof HTMLElement && (
node.tagName.toLowerCase() === 'blockquote' ||
node.tagName.toLowerCase() === 'cite' ||
node.tagName.toLowerCase() === 'q'
) ) {
return NodeFilter.FILTER_REJECT;