mirror of
https://github.com/discourse/discourse.git
synced 2025-06-18 15:42:31 +08:00

This is a hidden site setting which has never been publicized, and is not recommended for use. If we decide to add a feature like this in future as a visible site setting, it would need many more safeguards to prevent misuse.
23 lines
341 B
Ruby
23 lines
341 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Onebox
|
|
module Engine
|
|
module HTML
|
|
private
|
|
|
|
# Overwrite for any custom headers
|
|
def http_params
|
|
{}
|
|
end
|
|
|
|
def raw
|
|
@raw ||= Onebox::Helpers.fetch_html_doc(url, http_params)
|
|
end
|
|
|
|
def html?
|
|
raw.respond_to(:css)
|
|
end
|
|
end
|
|
end
|
|
end
|