diff --git a/lib/common.js b/lib/common.js index 298e9b0e..45d85561 100644 --- a/lib/common.js +++ b/lib/common.js @@ -1,7 +1,7 @@ "use strict"; import encode from "mdurl/encode.js"; -import { decodeHTML } from "entities"; +import { decodeEntity } from "html-entities"; var C_BACKSLASH = 92; @@ -58,7 +58,7 @@ var unescapeChar = function(s) { if (s.charCodeAt(0) === C_BACKSLASH) { return s.charAt(1); } else { - return decodeHTML(s); + return decodeEntity(s); } }; diff --git a/lib/inlines.js b/lib/inlines.js index 21a0d685..a456a4ab 100644 --- a/lib/inlines.js +++ b/lib/inlines.js @@ -3,7 +3,7 @@ import Node from "./node.js"; import * as common from "./common.js"; import fromCodePoint from "./from-code-point.js"; -import { decodeHTML } from "entities"; +import { decodeEntity } from "html-entities"; import "string.prototype.repeat"; // Polyfill for String.prototype.repeat var normalizeURI = common.normalizeURI; @@ -756,7 +756,7 @@ var removeBracket = function() { var parseEntity = function(block) { var m; if ((m = this.match(reEntityHere))) { - block.appendChild(text(decodeHTML(m))); + block.appendChild(text(decodeEntity(m))); return true; } else { return false; diff --git a/package.json b/package.json index 8cc4b1b6..a2b820d8 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "pretest": "npm run build" }, "dependencies": { - "entities": "~2.0", + "html-entities": "^2.3.2", "mdurl": "~1.0.1", "minimist": ">=1.2.2", "string.prototype.repeat": "^0.2.0"