From 0b5bf9c1ab6a790bd376cd6142f2cde55b662dcd Mon Sep 17 00:00:00 2001 From: Stefano Bagnara Date: Wed, 18 May 2022 16:27:49 +0200 Subject: [PATCH] add emptyAttr option to restore previous cheerio behaviour --- src/htmml2html.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/htmml2html.js b/src/htmml2html.js index 036547d..8a6ed3e 100644 --- a/src/htmml2html.js +++ b/src/htmml2html.js @@ -182,6 +182,8 @@ var translateMetaTemplate = function (input, output) { recognizeSelfClosing: false, lowerCaseTags: false, _useHtmlParser2: true, + // use attr="" instead of attr for empty attr (to stay consistent with previous cheerio releases) + emptyAttrs: true, }); // inlining