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.
[ Backported from commit e325b748be
in ELinks 0.12.GIT. --KON ]
This commit is contained in:
parent
fe886d198d
commit
0286a66c98
@ -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