diff options
author | corvid <corvid@lavabit.com> | 2011-11-11 04:26:41 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-11-11 04:26:41 +0000 |
commit | 980fe05f47b9d6dd8626b5ea021e2c16807ff5ca (patch) | |
tree | 2e5670d74d8fcfb8e7f6b84ffaf5f77b74855746 /src/css.cc | |
parent | 119aa95ed6bc612dd4ef7a3121d9bf220148aaa4 (diff) |
locale-independent ASCII character case handling
Basically, I and i are different letters in Turkic languages, and this
causes problems for str(n)casecmp and toupper/tolower in these locales
when dillo is dealing with ASCII.
Diffstat (limited to 'src/css.cc')
-rw-r--r-- | src/css.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -265,16 +265,16 @@ bool CssSimpleSelector::match (const DoctreeNode *n) { if (element != ELEMENT_ANY && element != n->element) return false; if (pseudo != NULL && - (n->pseudo == NULL || dStrcasecmp (pseudo, n->pseudo) != 0)) + (n->pseudo == NULL || dStrAsciiCasecmp (pseudo, n->pseudo) != 0)) return false; - if (id != NULL && (n->id == NULL || dStrcasecmp (id, n->id) != 0)) + if (id != NULL && (n->id == NULL || dStrAsciiCasecmp (id, n->id) != 0)) return false; if (klass != NULL) { for (int i = 0; i < klass->size (); i++) { bool found = false; if (n->klass != NULL) { for (int j = 0; j < n->klass->size (); j++) { - if (dStrcasecmp (klass->get(i), n->klass->get(j)) == 0) { + if (dStrAsciiCasecmp (klass->get(i), n->klass->get(j)) == 0) { found = true; break; } |