lib/softcover/builders/epub.rb in softcover-1.2.5 vs lib/softcover/builders/epub.rb in softcover-1.2.6

- old
+ new

@@ -559,11 +559,15 @@ end toc_ncx_template(manifest.title, manifest.uuid, chapter_nav) end def chapter_name(n) - n == 0 ? language_labels["frontmatter"] - : "#{chapter_label(n)}: #{chapters[n].title}" + n == 0 ? language_labels["frontmatter"] : strip_html(chapters[n].menu_heading) + end + + # Strip HTML elements from the given text. + def strip_html(text) + Nokogiri::HTML.fragment(text).content end # Returns the nav HTML content. def nav_html if article? \ No newline at end of file