diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js index dad004f697..19759c72ae 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js @@ -788,9 +788,9 @@ ve.ui.MWMediaDialog.prototype.cleanAPIresponse = function ( rawResponse, config } // Check if the string should be truncated - return isTruncated && !config.ignoreCharLimit ? + return mw.html.escape( isTruncated && !config.ignoreCharLimit ? originalText.slice( 0, charLimit ) + ellipsis : - originalText; + originalText ); }; /**