lib/epubber/models/chapter.rb in epubber-0.1.0 vs lib/epubber/models/chapter.rb in epubber-0.1.1

- old
+ new

@@ -1,8 +1,12 @@ +require 'epubber/models/concerns/has_endnotes' + # Represents a book's chapter module Epubber::Models class Chapter + include Epubber::Models::Concerns::HasHTML + def initialize @id = 0 @title = 'Not specified' @content = '<p>Not specified</p>' end @@ -14,10 +18,10 @@ def title(text) @title = text end def content(text) - @content = text + @content = clean_html(text) end def contextify { 'id' => @id, 'title' => @title, 'content' => @content } end