From 08ab4d232067fdc770b09b136c91041053637b7e Mon Sep 17 00:00:00 2001 From: Jakob Kramer Date: Tue, 28 Feb 2012 22:51:16 +0100 Subject: [PATCH] strip html tags from the title --- lib/ronn/template.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ronn/template.rb b/lib/ronn/template.rb index 2c89667..ead7e52 100644 --- a/lib/ronn/template.rb +++ b/lib/ronn/template.rb @@ -1,4 +1,5 @@ require 'mustache' +require 'hpricot' module Ronn class Template < Mustache @@ -36,10 +37,11 @@ def name_and_section? def title if !name_and_section? && tagline - tagline + result = tagline else - [page_name, tagline].compact.join(' - ') + result = [page_name, tagline].compact.join(' - ') end + Hpricot(result).to_plain_text end def custom_title?