From b771df53706c6a9835c3b16c5e212194a30638fa Mon Sep 17 00:00:00 2001 From: Cameron Howey Date: Fri, 4 May 2012 18:23:46 -0400 Subject: [PATCH] Escape numbered HTML entities Code by @wavoemployee25 --- lib/runtime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime.js b/lib/runtime.js index bd4042895..497eee283 100644 --- a/lib/runtime.js +++ b/lib/runtime.js @@ -85,7 +85,7 @@ exports.attrs = function attrs(obj, escaped){ exports.escape = function escape(html){ return String(html) - .replace(/&(?!\w+;)/g, '&') + .replace(/&(?!(\w+|\#\d+);)/g, '&') .replace(//g, '>') .replace(/"/g, '"');