Skip to content

Commit

Permalink
upgrade html-entities version
Browse files Browse the repository at this point in the history
  • Loading branch information
hungvu193 committed Jun 8, 2023
1 parent a1e97c5 commit 7edf4f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/str.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-control-regex */
import _ from 'underscore';
import {AllHtmlEntities} from 'html-entities';
import {encode, decode} from 'html-entities';
import replaceAll from 'string.prototype.replaceall';
import {CONST} from './CONST';
import {URL_REGEX} from './Url';
Expand Down Expand Up @@ -90,7 +90,7 @@ const Str = {
if (typeof jQuery !== 'undefined') {
return jQuery('<textarea/>').html(s).text();
}
return AllHtmlEntities.decode(s);
return decode(s);
},

/**
Expand All @@ -104,7 +104,7 @@ const Str = {
if (typeof jQuery !== 'undefined') {
return jQuery('<textarea/>').text(s).html();
}
return AllHtmlEntities.encode(s);
return encode(s);
},

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"classnames": "2.3.1",
"clipboard": "2.0.4",
"html-entities": "^1.3.1",
"html-entities": "^2.3.3",
"jquery": "3.6.0",
"localforage": "^1.10.0",
"lodash": "4.17.21",
Expand Down

0 comments on commit 7edf4f1

Please sign in to comment.