diff options
author | Andrew Dolgov <[email protected]> | 2021-11-02 22:42:39 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-11-02 22:42:39 +0300 |
commit | 4363cad118cb7bb6bae49360d2767084a32a342d (patch) | |
tree | 1315ec9f8ceae60003e107e7ce5681b96073a00c /js/reader.js | |
parent | a31ff1b14177878414a92ebbe30acf61be6f4770 (diff) |
strip styles/attributes from tables, fix pre word wrap
Diffstat (limited to 'js/reader.js')
-rw-r--r-- | js/reader.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/reader.js b/js/reader.js index 246eb7d..f658bbe 100644 --- a/js/reader.js +++ b/js/reader.js @@ -566,14 +566,19 @@ const Reader = { $(doc).find("html") .attr("class", ""); - $(doc).find("a, p, span, em, i, strong, b, body, header, section, div, big, small") + $(doc).find("pre") + .css("white-space", "pre-wrap"); + + $(doc).find("a, p, span, em, i, strong, b, body, header, section, div, big, small, table, tr, td") .attr("class", "") .css("font-family", "inherit") .css("font-size", "inherit") .css("color", "") .css("border", "none ! important") .css("background", "") - .css("background-color", ""); + .css("background-color", "") + .attr("width", "") + .attr("height", ""); // same as above except for allowed font-size $(doc).find("h1, h2, h3, h4, h5") |