From d4e1ad25c067420fcfe76b7f9084961b1e9e26ce Mon Sep 17 00:00:00 2001 From: ajya Date: Mon, 30 Oct 2017 13:17:48 +0000 Subject: [PATCH 1/2] fix #168 for Latvian special chars and numerical entities visibility in excerpt --- qml/ttrss/models/htmlentities.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qml/ttrss/models/htmlentities.js b/qml/ttrss/models/htmlentities.js index 3f09643..3ad02a3 100644 --- a/qml/ttrss/models/htmlentities.js +++ b/qml/ttrss/models/htmlentities.js @@ -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; } From 8bc3605d60038073f3dccf58fb0cf16201758acc Mon Sep 17 00:00:00 2001 From: Hauke Schade Date: Sat, 11 Nov 2017 11:58:26 +0100 Subject: [PATCH 2/2] CONTRIBUTORS: added ajya to list of contributors --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 19b4994..6301472 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,3 +14,4 @@ CONTRIBUTORS - clovis86 - Heimen Stoffels (Vistaus) - mp107 +- ajya