summaryrefslogtreecommitdiffstats
path: root/app-dicts/libtranslate/files/libtranslate-ds-promt.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /app-dicts/libtranslate/files/libtranslate-ds-promt.patch
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'app-dicts/libtranslate/files/libtranslate-ds-promt.patch')
-rw-r--r--app-dicts/libtranslate/files/libtranslate-ds-promt.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/app-dicts/libtranslate/files/libtranslate-ds-promt.patch b/app-dicts/libtranslate/files/libtranslate-ds-promt.patch
new file mode 100644
index 0000000..6b30145
--- /dev/null
+++ b/app-dicts/libtranslate/files/libtranslate-ds-promt.patch
@@ -0,0 +1,27 @@
+diff -dPNur libtranslate-0.99/src/modules/translate-generic-service.c libtranslate-0.99-new/src/modules/translate-generic-service.c
+--- libtranslate-0.99/src/modules/translate-generic-service.c 2007-06-27 17:26:10.000000000 +0200
++++ libtranslate-0.99-new/src/modules/translate-generic-service.c 2007-06-27 17:23:55.000000000 +0200
+@@ -1238,7 +1245,22 @@
+ {
+ if (modifier_value)
+ g_warning(_("%s: value specified for \"escape\" modifier"), warning_prefix);
+- modified = soup_uri_encode(value, NULL);
++ modified = soup_uri_encode(value, "&");
++ }
++ else if (! strcmp(modifier_name, "entities"))
++ {
++ int i;
++ char *ptr;
++
++ modified = g_malloc(strlen(value)*6 + 1);
++ for (i=0,ptr=modified;value[i];i++) {
++ if ((unsigned char)(value[i])<160) *(ptr++)=value[i];
++ else {
++ sprintf(ptr, "&#%u;", (unsigned char)(value[i]));
++ ptr+=6;
++ }
++ }
++ *ptr = 0;
+ }
+ else if (! strcmp(modifier_name, "charset"))
+ {