From ec23b61e148239dacee91373bd4612906fe7b15a Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 15 Feb 2022 10:36:01 +0100 Subject: [PATCH] Improvement for #184 --- dev/Common/Html.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/Common/Html.js b/dev/Common/Html.js index 6d2372353..73fb9a6cf 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -170,9 +170,11 @@ export const else if ('TABLE' === name && hasAttribute('width')) { value = getAttribute('width'); - delAttribute('width'); - oStyle.maxWidth = value + (/^[0-9]+$/.test(value) ? 'px' : ''); - oStyle.removeProperty('width'); + if (!value.includes('%')) { + delAttribute('width'); + oStyle.maxWidth = value + 'px'; + oStyle.removeProperty('width'); + } } else if ('A' === name) {