[pan2/testing: 29/279] Bug 648375 fix mailto url encoding
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/testing: 29/279] Bug 648375 fix mailto url encoding
- Date: Sat, 3 Dec 2011 22:27:49 +0000 (UTC)
commit 6dffb398488de51a768496637f53d7915a8fe8f4
Author: K. Haley <haleykd users sf net>
Date: Mon May 23 22:13:12 2011 -0600
Bug 648375 fix mailto url encoding
Characters with the high bit set were treated as negative during
encoding so 0xff became 0xffff.
pan/gui/post-ui.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index dcfc08a..ad4b754 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -526,8 +526,9 @@ namespace
if (keep.count(*pch))
out += *pch;
else {
+ unsigned char uc = (unsigned char)*pch;
char buf[8];
- g_snprintf (buf, sizeof(buf), "%%%02x", (int)*pch);
+ g_snprintf (buf, sizeof(buf), "%%%02x", (int)uc);
out += buf;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]