mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -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:
parent
0dfb88c802
commit
e325b748be
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user