From 3a6f2d42bc3819a95077826d1a1fcf914f341a29 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Wed, 22 Jul 2015 20:15:32 -0700 Subject: [PATCH] Fix Chrome preformat bug Closes #423 --- src/core/normalizer.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/normalizer.coffee b/src/core/normalizer.coffee index 160d3d7239..f8d6692d49 100644 --- a/src/core/normalizer.coffee +++ b/src/core/normalizer.coffee @@ -56,6 +56,10 @@ class Normalizer node.style[style] = value node.removeAttribute(attribute) ) + # Chrome turns into style in some cases + if (node.style.fontWeight == 'bold') + node.style.fontWeight = '' + dom(node).wrap(document.createElement('b')) this.whitelistStyles(node) return this.whitelistTags(node)