cafe-utility 4.13.0 → 4.13.1

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -840,7 +840,9 @@ const htmlEntityMap = {
840
840
  }
841
841
 
842
842
  function decodeHtmlEntities(string) {
843
- let buffer = string.replace(/&#(\d+);/g, (_, dec) => String.fromCharCode(dec))
843
+ let buffer = string
844
+ .replace(/&#(\d+);/g, (_, dec) => String.fromCharCode(dec))
845
+ .replace(/&#x(\d+);/g, (_, hex) => String.fromCharCode(parseInt(hex, 16)))
844
846
  for (const key of Object.keys(htmlEntityMap)) {
845
847
  buffer = buffer.split(key).join(htmlEntityMap[key])
846
848
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-utility",
3
- "version": "4.13.0",
3
+ "version": "4.13.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {