marked 0.3.5 → 0.3.6

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/lib/marked.js +2 -1
  2. package/package.json +1 -1
package/lib/marked.js CHANGED
@@ -1094,7 +1094,8 @@ function escape(html, encode) {
1094
1094
  }
1095
1095
 
1096
1096
  function unescape(html) {
1097
- return html.replace(/&([#\w]+);/g, function(_, n) {
1097
+ // explicitly match decimal, hex, and named HTML entities
1098
+ return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) {
1098
1099
  n = n.toLowerCase();
1099
1100
  if (n === 'colon') return ':';
1100
1101
  if (n.charAt(0) === '#') {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "marked",
3
3
  "description": "A markdown parser built for speed",
4
4
  "author": "Christopher Jeffrey",
5
- "version": "0.3.5",
5
+ "version": "0.3.6",
6
6
  "main": "./lib/marked.js",
7
7
  "bin": "./bin/marked",
8
8
  "man": "./man/marked.1",