diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-09-13 15:05:57 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-09-13 15:21:55 -0400 |
commit | cf3e7076381da0ae60150ec533c4381b75c7efc6 (patch) | |
tree | ff57cd6c42c6f1b51054390ad241b52ac0f5bdbf /lib | |
parent | options, 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)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/epub_format.rb | 8 |
1 files changed, 5 insertions, 3 deletions
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>©</sup> ') - %{<p class="small_left">Rights: #{rights}</p>} + rghts=@md.rights.all.gsub(/<br>/,'<br />') + rghts=rghts.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') + %{<p class="small_left">Rights: #{rghts}</p>} end self end |