Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/204038
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 --- M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/38/204038/1 diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js index 545aa97..d66cacd 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 = $( '<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' ) + .append( $.parseHTML( itemHtml ) ) .find( 'a' ) .attr( 'target', '_blank' ); - tool.$items.append( node ); + tool.$items.append( $node ); } ); this.popup.$body.append( this.$items ); -- To view, visit https://gerrit.wikimedia.org/r/204038 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: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits