diff --git a/packages/readabilityjs/Readability.js b/packages/readabilityjs/Readability.js index d9c64963a..d5963bc1a 100644 --- a/packages/readabilityjs/Readability.js +++ b/packages/readabilityjs/Readability.js @@ -512,15 +512,15 @@ Readability.prototype = { if (src) { const absoluteSrc = this.toAbsoluteURI(src); - const parseNumber = (str) => { + const attToNumber = (str) => { if (!str) { return 0; } - const res = parseNumber(str); + const res = parseInt(str); if (isNaN(res)) { return 0; } return res } - const width = parseInt(image.getAttribute('width') || image.style.width); - const height = parseInt(image.getAttribute('height') || image.style.height); + const width = attToNumber(image.getAttribute('width') || image.style.width); + const height = attToNumber(image.getAttribute('height') || image.style.height); const proxySrc = this.createImageProxyUrl(absoluteSrc, width, height); image.setAttribute('src', proxySrc);