From da566d2163e49e2e017f6aece2c9689b0a1834a7 Mon Sep 17 00:00:00 2001 From: rootavish Date: Thu, 27 Nov 2014 10:23:14 +0530 Subject: ePub backend: unescape uri strings from toc Toc may include links with strings escaped for URI format. We needed to un-escape them. --- backend/epub/epub-document.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backend/epub/epub-document.c') 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'; -- cgit v1.2.1