summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorrootavish <[email protected]>2014-11-27 10:23:14 +0530
committerinfirit <[email protected]>2014-12-08 14:01:29 +0100
commitda566d2163e49e2e017f6aece2c9689b0a1834a7 (patch)
treed46beddd253dc8aa135c8e5cf65d3518b13aa8df /backend
parent1b877bf76a013ce007ff18a4528e168d575a1b88 (diff)
downloadatril-da566d2163e49e2e017f6aece2c9689b0a1834a7.tar.bz2
atril-da566d2163e49e2e017f6aece2c9689b0a1834a7.tar.xz
ePub backend: unescape uri strings from toc
Toc may include links with strings escaped for URI format. We needed to un-escape them.
Diffstat (limited to 'backend')
-rw-r--r--backend/epub/epub-document.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c
index 8c047b2e..e4412ace 100644
--- a/backend/epub/epub-document.c
+++ b/backend/epub/epub-document.c
@@ -1250,6 +1250,12 @@ setup_document_index(EpubDocument *epub_document,gchar *containeruri)
g_string_append_printf(pagelink,"/%s",newnode->pagelink);
xmlFree(newnode->pagelink);
+ gchar *escaped = g_strdup(pagelink->str);
+
+ //unescaping any special characters
+ pagelink->str = g_uri_unescape_string (escaped,NULL);
+ g_free(escaped);
+
if ((end = g_strrstr(pagelink->str,"#")) != NULL) {
fragment = g_strdup(g_strrstr(pagelink->str,"#"));
*end = '\0';