diff --git a/src/assets/HTMLAsset.js b/src/assets/HTMLAsset.js index 81ace3252cf..89a2b5dff50 100644 --- a/src/assets/HTMLAsset.js +++ b/src/assets/HTMLAsset.js @@ -137,7 +137,12 @@ class HTMLAsset extends Asset { if ( !Object.keys(node.attrs).some(attr => { let values = META[attr]; - return values && values.includes(node.attrs[attr]); + + return ( + values && + values.includes(node.attrs[attr]) && + node.attrs.content !== '' + ); }) ) { return node; diff --git a/test/integration/html/index.html b/test/integration/html/index.html index e5a060f2f22..1700b1dbf3b 100644 --- a/test/integration/html/index.html +++ b/test/integration/html/index.html @@ -1,9 +1,14 @@ + + + + +

Hello world

Linking to another page

@@ -15,4 +20,5 @@

Hello world

hello world +