aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-09-13 15:05:57 -0400
committerRalph Amissah <ralph@amissah.com>2010-09-22 09:53:23 -0400
commit8fb333ce2a22a067a2e4bdb205cd52f2c8e0f8ea (patch)
tree2beed8ee8a30ef27dcd44375d8f98bbb3ce1175c
parentoptions, add expressive options --[name] as alternative to flags -[x] (diff)
epub, fix xhtml line-break in rights metadata, results in unreadable epub (Closes: #596736)
* epub output not readable by all epub-reader software (Closes: #596736) (else epub output can be viewed in calibre, but not in fbreader or okular)
-rw-r--r--CHANGELOG_v26
-rw-r--r--data/doc/sisu/v2/CHANGELOG6
-rw-r--r--lib/sisu/v2/epub_format.rb8
3 files changed, 15 insertions, 5 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2
index 36c2bc99..2f8429ee 100644
--- a/CHANGELOG_v2
+++ b/CHANGELOG_v2
@@ -86,7 +86,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.3.orig.tar.gz
(2010-09-13:37/1)
sisu_2.6.3-5.dsc
sisu_2.6.3-5.diff.gz
- [debian freeze, code and documentation fixes]
+ [debian freeze, code fixes]
+
+ * epub, fix xhtml line-break in rights metadata, results in unreadable epub
+ (Closes: #596736) epub output not readable by all epub-reader software (else
+ epub output can be viewed in calibre, but not in fbreader or okular)
* options, add expressive options --[name] as alternative to flags -[x]
diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG
index 1db28e99..d33438d7 100644
--- a/data/doc/sisu/v2/CHANGELOG
+++ b/data/doc/sisu/v2/CHANGELOG
@@ -86,7 +86,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.6.3.orig.tar.gz
(2010-09-13:37/1)
sisu_2.6.3-5.dsc
sisu_2.6.3-5.diff.gz
- [debian freeze, code and documentation fixes]
+ [debian freeze, code fixes]
+
+ * epub, fix xhtml line-break in rights metadata, results in unreadable epub
+ (Closes: #596736) epub output not readable by all epub-reader software (else
+ epub output can be viewed in calibre, but not in fbreader or okular)
* options, add expressive options --[name] as alternative to flags -[x]
diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb
index 350e6f2c..28fe7357 100644
--- a/lib/sisu/v2/epub_format.rb
+++ b/lib/sisu/v2/epub_format.rb
@@ -1041,7 +1041,8 @@ WOK
end
rights=if defined? @md.rights.all \
and @md.rights.all =~/\S+/
- %{\n <dc:rights>#{@md.rights.all}</dc:rights>}
+ rights=@md.rights.all.gsub(/<br>/,'<br />')
+ %{\n <dc:rights>#{rights}</dc:rights>}
else ''
end
<<WOK
@@ -1310,8 +1311,9 @@ WOK
end
def rights
def all
- rights=@md.rights.all.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>&copy;</sup>&nbsp;')
- %{<p class="small_left">Rights: #{rights}</p>}
+ rghts=@md.rights.all.gsub(/<br>/,'<br />')
+ rghts=rghts.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>&copy;</sup>&nbsp;')
+ %{<p class="small_left">Rights: #{rghts}</p>}
end
self
end