diff --git a/app/controllers/faqs_controller.rb b/app/controllers/faqs_controller.rb index 8fe5c45..7cc5a11 100644 --- a/app/controllers/faqs_controller.rb +++ b/app/controllers/faqs_controller.rb @@ -43,8 +43,12 @@ class FaqsController < ApplicationController } end tags = faq.tags.map{|tag| { "tag" => tag.name } } rescue [] + temp_rich_title = Nokogiri::HTML(faq.rich_title).css('body') + temp_rich_title.children.each_with_index do |child,i| + temp_rich_title.children[i].attribute('style').value = child.attribute('style').value.gsub(/\b(?:font-size\s*?:\s*([^;>]*?)(?=[;">}]))/,'') + end { - "extras" => {"question" => faq.title,"answer" => faq.answer}, + "extras" => {"question" => temp_rich_title,"answer" => faq.answer}, "faqs_links" => faqs_links, "faqs_files" => faqs_files, "tags" => tags,