diff --git a/js/battledata.js b/js/battledata.js index 145ea6a2f..24c440699 100644 --- a/js/battledata.js +++ b/js/battledata.js @@ -645,6 +645,11 @@ var Tools = { srcIdx = i; dataUri = attribs[i + 1]; } + if (attribs[i] === 'src' && attribs[i + 1].substr(0, 2) === '//') { + if (location.protocol !== 'http:' && location.protocol !== 'https:') { + attribs[i + 1] = 'http:' + attribs[i + 1]; + } + } } } attribs = html.sanitizeAttribs(tagName, attribs, uriRewriter);