@ecency/render-helper 2.4.29 → 2.4.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser/index.js
CHANGED
|
@@ -199,8 +199,11 @@ function createDoc(html) {
|
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
const cleanedHtml = removeDuplicateAttributes(html);
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
try {
|
|
203
|
+
return DOMParser.parseFromString(`<body>${cleanedHtml}</body>`, "text/html");
|
|
204
|
+
} catch {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
204
207
|
}
|
|
205
208
|
function makeEntryCacheKey(entry) {
|
|
206
209
|
return `${entry.author}-${entry.permlink}-${entry.last_update}-${entry.updated}`;
|