Skip to content

Commit 03f989a

Browse files
Update html-entities (#727)
1 parent 3b3febb commit 03f989a

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

lib/broccoli/search-indexer.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
const Writer = require('broccoli-caching-writer');
44
const lunr = require('lunr');
55
const striptags = require('striptags');
6-
const Entities = require('html-entities').AllHtmlEntities;
6+
const { decode } = require('html-entities');
77
const fs = require('fs-extra');
88
const path = require('path');
99

10-
const htmlEntities = new Entities();
11-
1210
module.exports = class SearchIndexCompiler extends Writer {
1311
constructor(input, options) {
1412
super([input]);
@@ -121,7 +119,7 @@ module.exports = class SearchIndexCompiler extends Writer {
121119
type: 'component',
122120
title: item.attributes.name,
123121
keywords: keywords,
124-
text: htmlEntities.decode(striptags(normalizeText(item.attributes.description))),
122+
text: decode(striptags(normalizeText(item.attributes.description))),
125123
item
126124
};
127125
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"git-repo-info": "^2.1.1",
7979
"highlight.js": "^10.4.0",
8080
"hosted-git-info": "^3.0.4",
81-
"html-entities": "^1.2.1",
81+
"html-entities": "^2.0.6",
8282
"inflected": "^2.0.3",
8383
"jsdom": "^16.4.0",
8484
"json-api-serializer": "^2.2.1",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9172,10 +9172,10 @@ html-encoding-sniffer@^2.0.1:
91729172
dependencies:
91739173
whatwg-encoding "^1.0.5"
91749174

9175-
html-entities@^1.2.1:
9176-
version "1.4.0"
9177-
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc"
9178-
integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==
9175+
html-entities@^2.0.6:
9176+
version "2.0.6"
9177+
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.0.6.tgz#e773b9acfad65718dd194e599f1b11cf5704b925"
9178+
integrity sha512-SiH2gwQT78XunjDZfXAa6KrE91kzZUGbef3PL9JmWS+DhL48/+FC+1sNh++/titGzIs8NvH+xuNam/FwV7mJsQ==
91799179

91809180
html-tags@^3.1.0:
91819181
version "3.1.0"

0 commit comments

Comments
 (0)