lib/html/pipeline/linuxfr.rb in html-pipeline-linuxfr-0.14.2 vs lib/html/pipeline/linuxfr.rb in html-pipeline-linuxfr-0.14.3

- old
+ new

@@ -20,12 +20,13 @@ ], CONTEXT result = pipeline.call text result[:output].to_s end - def self.sanitize(text) - pipeline = HTML::Pipeline.new [HTML::Pipeline::SanitizationFilter], CONTEXT - result = pipeline.call text + def self.sanitize(html) + return "" if html.nil? + pipeline = HTML::Pipeline.new [HTML::Pipeline::SanitizationFilter] + result = pipeline.call html result[:output].to_s end end end