diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-09-08 12:02:51 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-09-08 14:10:16 +0200 |
commit | a27eb931c22313d4dd5c73b35358c0532d20b79e (patch) | |
tree | eb922abdafe8c26d7f6a3302aadcde90c49f143a /external/libepubgen | |
parent | 9c34c9c2409a8f09c3373d314ef7872d7c2aee92 (diff) |
EPUB export: fix double escaped NBSP
The EPUB package interface already XML-escapes characters, avoid a double
escape.
And once that works, handle NBSP/tabs.
Change-Id: I8b7bbdc2592096bdd46fbdb29b48b723ef5cf990
Reviewed-on: https://gerrit.libreoffice.org/42098
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'external/libepubgen')
-rw-r--r-- | external/libepubgen/libepubgen-epub3.patch.1 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1 index 0415bf340e78..8e62660ea566 100644 --- a/external/libepubgen/libepubgen-epub3.patch.1 +++ b/external/libepubgen/libepubgen-epub3.patch.1 @@ -1906,3 +1906,32 @@ index 1661064..3340643 100644 -- 2.12.3 +From bce7c05a18a4c5089d5ac77bc61b9f6978e7224b Mon Sep 17 00:00:00 2001 +From: Miklos Vajna <vmiklos@collabora.co.uk> +Date: Fri, 8 Sep 2017 11:21:32 +0200 +Subject: [PATCH] EPUBHTMLGenerator: write un-escaped NBSP + +Package implementations are supposed to take care of escaping, like it +was already a requirement for normal text. +--- + src/lib/EPUBHTMLGenerator.cpp | 3 ++- + src/test/EPUBTextGeneratorTest.cpp | 18 ++++++++++++++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/src/lib/EPUBHTMLGenerator.cpp b/src/lib/EPUBHTMLGenerator.cpp +index aa09332..ed968bf 100644 +--- a/src/lib/EPUBHTMLGenerator.cpp ++++ b/src/lib/EPUBHTMLGenerator.cpp +@@ -681,7 +681,8 @@ void EPUBHTMLGenerator::insertSpace() + { + if (m_impl->m_ignore) + return; +- m_impl->output().insertCharacters(" "); ++ // NBSP. ++ m_impl->output().insertCharacters("\xc2\xa0"); + } + + void EPUBHTMLGenerator::openOrderedListLevel(const RVNGPropertyList &propList) +-- +2.12.3 + |