aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/epub_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/epub_format.rb')
-rw-r--r--lib/sisu/v2/epub_format.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb
index 28fe7357..761d771e 100644
--- a/lib/sisu/v2/epub_format.rb
+++ b/lib/sisu/v2/epub_format.rb
@@ -1031,12 +1031,16 @@ WOK
def metadata #metadata dc
author=if defined? @md.creator.author \
and @md.creator.author =~/\S+/
- %{\n <dc:creator opf:file-as="#{@md.creator.author}" opf:role="aut">#{@md.creator.author}</dc:creator>}
+ x=@md.creator.author.gsub!(/</,'&lt;'); @md.creator.author.gsub!(/>/,'&gt;')
+ @md.creator.author.gsub!(/&lt;br(?: \/)?&gt;/,'<br />')
+ %{\n <dc:creator opf:file-as="#{x}" opf:role="aut">#{x}</dc:creator>}
else ''
end
illustrator=if defined? @md.creator.illustrator \
and @md.creator.illustrator =~/\S+/
- %{\n <dc:creator opf:file-as="#{@md.creator.illustrator}" opf:role="ill">#{@md.creator.illustrator}</dc:creator>}
+ x=@md.creator.illustrator.gsub!(/</,'&lt;'); @md.creator.illustrator.gsub!(/>/,'&gt;')
+ @md.creator.illustrator.gsub!(/&lt;br(?: \/)?&gt;/,'<br />')
+ %{\n <dc:creator opf:file-as="#{x}" opf:role="ill">#{x}</dc:creator>}
else ''
end
rights=if defined? @md.rights.all \
@@ -1588,7 +1592,7 @@ WOK
#{@vz.js_top}}
end
def toc_metadata
- @metalink=%{./#{@md.fn[:meatadata]}}
+ @metalink=%{./#{@md.fn[:metadata]}}
toc_metadata
end
def title_banner(title,subtitle,creator)