From 17aa754c3c0e00f47a8e3f4c06f9df9705b269ec Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 18 Oct 2014 16:38:19 -0700 Subject: Change from-code-point.js so it doesn't alter String prototype. --- js/lib/html5-entities.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/lib/html5-entities.js') diff --git a/js/lib/html5-entities.js b/js/lib/html5-entities.js index 4257ba0..235fc66 100644 --- a/js/lib/html5-entities.js +++ b/js/lib/html5-entities.js @@ -1,3 +1,5 @@ +var fromCodePoint = require('./from-code-point'); + var entities = { AAacute: 'Á', aacute: 'á', Abreve: 'Ă', @@ -2135,7 +2137,7 @@ var entityToChar = function(m) { } else { num = parseInt(m.slice(2,-1), 10); } - uchar = String.fromCodePoint(num); + uchar = fromCodePoint(num); } else { uchar = entities[m.slice(1,-1)]; } -- cgit v1.2.3