Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/204168
Change subject: MWPopupTool: Don't assume editnotice html has a single wrapping element ...................................................................... MWPopupTool: Don't assume editnotice html has a single wrapping element In case of FlaggedRevs, for example, the software is given a loose string of html with a Bold element, Text nodes, and Anchor element. Bug: T95989 Change-Id: I3d345677507ffc08feec0f7785e148ac98f19cb7 (cherry picked from commit 66c9d538c504f5cd79061e869020768a0a2cf751) --- M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/68/204168/1 diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js index 5099bb6..f040ad5 100644 --- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js +++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js @@ -30,14 +30,14 @@ this.$items = this.$( '<div>' ).addClass( 've-ui-mwNoticesPopupTool-items' ); // Initialization - items.forEach( function ( item ) { - var node = $.parseHTML( item )[0]; - $( node ) + items.forEach( function ( itemHtml ) { + var $node = $( '<div>' ) .addClass( 've-ui-mwNoticesPopupTool-item' ) - .find( 'a' ) - .attr( 'target', '_blank' ); + .append( $.parseHTML( itemHtml ) ); - tool.$items.append( node ); + $node.find( 'a' ).attr( 'target', '_blank' ); + + tool.$items.append( $node ); } ); this.popup.$body.append( this.$items ); -- To view, visit https://gerrit.wikimedia.org/r/204168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d345677507ffc08feec0f7785e148ac98f19cb7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.25wmf24 Gerrit-Owner: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits