This commit is contained in:
bootstraponline
2013-03-04 19:32:55 -05:00
parent a31ba16070
commit 8ebc2f7079
2 changed files with 49 additions and 2 deletions
+3 -2
View File
@@ -138,8 +138,9 @@ module Precious
#
def page_header_from_content(content)
doc = build_document(content)
title = find_header_node(doc)
Sanitize.clean(title.to_xml( @@to_xml )).strip unless title.empty?
title = find_header_node(doc).inner_text.strip
title = nil if title.empty?
title
end
# Returns page content without title if it was extracted.