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.
- package/lib/marked.js +2 -1
- 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
|
-
|
|
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) === '#') {
|