Mwjames has submitted this change and it was merged. Change subject: Use plain-text title attribute ......................................................................
Use plain-text title attribute Since the image caption can contain rich content (in the simplest case, a page link to the image or another article), using the element's HTML content will show HTML tags within the title text. Instead, use the combined text content (with whitespace trimmed) as this will show the content as plain text. Change-Id: I5bcc7adcca5a9a2ff953a42f4174245e8701abaf --- M formats/gallery/resources/ext.srf.gallery.overlay.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mwjames: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/formats/gallery/resources/ext.srf.gallery.overlay.js b/formats/gallery/resources/ext.srf.gallery.overlay.js index 430cb34..d7561ba 100644 --- a/formats/gallery/resources/ext.srf.gallery.overlay.js +++ b/formats/gallery/resources/ext.srf.gallery.overlay.js @@ -77,7 +77,7 @@ var $this = $( this ), h = mw.html, image = $this.find( 'a.image' ), - imageText = $this.find( '.gallerytext p' ).html(); + imageText = $.trim( $this.find( '.gallerytext p' ).text() ); // Group images image.attr( 'rel', image.has( 'img' ).length ? galleryID : '' ); -- To view, visit https://gerrit.wikimedia.org/r/164895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bcc7adcca5a9a2ff953a42f4174245e8701abaf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticResultFormats Gerrit-Branch: master Gerrit-Owner: Poke <patrickwesterh...@gmail.com> Gerrit-Reviewer: Foxtrott <s7ep...@gmail.com> Gerrit-Reviewer: Mwjames <jamesin.hongkon...@gmail.com> Gerrit-Reviewer: Poke <patrickwesterh...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits