Inez has uploaded a new change for review. https://gerrit.wikimedia.org/r/70344
Change subject: (bug 43015) Make Parsoid use protocol relative URLs for images (http vs. https) ...................................................................... (bug 43015) Make Parsoid use protocol relative URLs for images (http vs. https) Change-Id: I253b9b7a9b463439e86d7cf7975cd92f9c851e70 --- M js/lib/ext.core.LinkHandler.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/44/70344/1 diff --git a/js/lib/ext.core.LinkHandler.js b/js/lib/ext.core.LinkHandler.js index ff83dda..f2f7130 100644 --- a/js/lib/ext.core.LinkHandler.js +++ b/js/lib/ext.core.LinkHandler.js @@ -598,11 +598,13 @@ * @param {string} info.url The base URL for the image */ function getPath( path, info ) { + var path; if ( info.thumburl ) { - return info.thumburl; + path = info.thumburl; } else if ( info.url ) { - return info.url; + path = info.url; } + return path.replace(/^https?:\/\//, '//'); } // It turns out that image captions can have unclosed block tags which -- To view, visit https://gerrit.wikimedia.org/r/70344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I253b9b7a9b463439e86d7cf7975cd92f9c851e70 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Inez <i...@wikia-inc.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits