1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

XBEL: Fix us-ascii charset lookup.

Previously, print_xml_entities did look up the charset, but did not
save the result anywhere and just used 0, leading to further lookups
in subsequent calls.  It worked by accident though, because the
codepage index of us-ascii currently is 0.
This commit is contained in:
Kalle Olavi Niemitalo 2007-03-11 10:36:44 +02:00 committed by Witold Filipczyk
parent d2e806b611
commit b0bc06d050

View File

@ -183,9 +183,9 @@ print_xml_entities(struct secure_save_info *ssi, const unsigned char *str)
|| (x) == '{' || (x) == '%' \
|| (x) == '+')
static int cp = 0;
static int cp = -1;
if (!cp) get_cp_index("us-ascii");
if (cp == -1) cp = get_cp_index("us-ascii");
for (; *str; str++) {
if (accept_char(*str))