Merge branch 'ajya-master'

This commit is contained in:
Hauke Schade 2017-11-11 11:58:59 +01:00
commit f33306bf64
2 changed files with 8 additions and 1 deletions

View file

@ -14,3 +14,4 @@ CONTRIBUTORS
- clovis86
- Heimen Stoffels (Vistaus)
- mp107
- ajya

View file

@ -136,6 +136,8 @@ function get_html_translation_table (table, quote_style) {
entities['253'] = 'ý';
entities['254'] = 'þ';
entities['255'] = 'ÿ';
entities['352'] = 'Š';
entities['353'] = 'š';
}
if (useQuoteStyle !== 'ENT_NOQUOTES') {
entities['34'] = '"';
@ -190,6 +192,10 @@ function html_entity_decode (string, quote_style) {
tmp_str = tmp_str.split(entity).join(symbol);
}
tmp_str = tmp_str.split(''').join("'");
//decode numeric html entities
tmp_str = tmp_str.replace(/&#([0-9]{1,3});/gi, function(match, numStr) {
var num = parseInt(numStr, 10);
return String.fromCharCode(num);
});
return tmp_str;
}