lib/onebox/preview.rb in onebox-1.8.10 vs lib/onebox/preview.rb in onebox-1.8.11
- old
+ new
@@ -64,10 +64,14 @@
Sanitize.fragment(html, @options[:sanitize_config] || Sanitize::Config::ONEBOX)
end
def engine
return nil unless @engine_class
- @engine ||= @engine_class.new(@url, cache)
+ return @engine if @engine
+
+ @engine = @engine_class.new(@url, cache)
+ @engine.options = @options
+ @engine
end
class InvalidURI < StandardError; end
end
end