Whether the target URI seems to return HTML

 @return [Bool]
967946
def html?
      fetch_headers unless fetched_headers?
      response = @get_response || @head_response
      return false if fetch_failed?
      return false unless response
      return false unless response.success?
      return false unless response["content-type"]
      response["content-type"].include? "text/html"
    end
724769
def generate_html
      return false if @css_file.nil? or @html.nil?
      
      css_link = @link_to_css.nil? ? @css_file : @link_to_css
      
      html = WebifyRuby::Html.new(css_link, @html)
      @html_file = html.html_file
    end
786717
def list_url?(u = nil, parsed: nil)
      return false if (u.nil? || u.empty?) && parsed.nil?
      parsed ||= parse_url(u)
      child_type = parsed[:child_type]
      parsed[:type] == 'lists' && (child_type.nil? || child_type.empty?)
    end
1170793
def valid_target_url?
      return false unless cloud_info = cloud_info()
      return false unless cloud_info[:name]
      return false unless cloud_info[:build]
      return false unless cloud_info[:support]
      return false unless cloud_info[:version]
      true
    rescue
      false
    end
620847
def gets
      begin
        data = make_http_request
        @hash = send(@@formats[@format][:oembed_parser], data) # Call the method specified in default_formats hash above
      rescue RuntimeError => e
        if e.message == "401"
          # Embedding disabled
          return nil        
        elsif e.message == "501"
          # Format not supported
          raise UnsupportedError, "#{@format} not supported by #{@domain}"
        elsif e.message == "404"
          # Not found
          raise Error, "#{@url} not found"
        else
          raise e
        end
      end
    end
1221714
def valid_asset_uri?(str)
      # Quick prefix check before attempting a full parse
      str.start_with?("file://".freeze) && parse_asset_uri(str) ? true : false
    rescue URI::InvalidURIError
      false
    end
1233272
def uri_from_rubygems
      return unless source.remotes.map(&:host).include?('rubygems.org')

      response = query_rubygems
      return unless response

      response[GEM_HOMEPAGES.find { |key| response[key] && !response[key].empty? }]
    end
133202
def valid?
      return false if @id.nil?
      return false if @name.nil?
      return false if @name !~ Regexp.new(/^(?!(.*[\\\"\\*\\\\\\>\\<\\?\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))/)
      return false if @node_type.nil?
      return false if @is_folder.nil?
      return false if @is_file.nil?
      return false if @modified_at.nil?
      return false if @modified_by_user.nil?
      return false if @created_at.nil?
      return false if @created_by_user.nil?
      return true
    end
1030702
function checkUriRaw(i) {
  const start = i;
  let l;

  while (i < tokensLength) {
    if (checkInterpolation(i) || checkVariable(i)) break;
    else if (l = checkUriRawCharacters(i)) i += l;
    else break;
  }

  tokens[start].uri_raw_end = i;

  return i - start;
}
67883
def process_target(str)
      if @root == true
        url(str =~ /^\// ? str : "/#{str}")
      else
        str =~ /^(http|https)/i ? str : url(str =~ /^\// ? str : "/#{str}")
      end
    end
72665
def detect_html(str)
      str = detect_unicode_bom(str)

      # Attempt Charlock detection
      if str.encoding == Encoding::BINARY
        charlock_detect(str)
      end

      # Fallback to environment's external encoding
      if str.encoding == Encoding::BINARY
        str.force_encoding(Encoding.default_external)
      end

      str
    end
1027552
def base
      @base = if doc
                href = doc.search('//head/base/@href')
                URI(href.to_s) unless href.nil? rescue nil
              end unless @base

      return nil if @base && @base.to_s.empty?
      @base
    end
7488
def http_url
      return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile)
      return if is_a?(Jekyll::Document) && !collection.write?
      @http_url ||= Addressable::URI.new(
        :scheme => scheme, :host => host, :port => port,
        :path => path_with_base(JekyllAdmin.site.config["baseurl"], url)
      ).normalize.to_s
    end
105955
def fetch
      assert_has_uri!

      response = client.get clean_uri, query: { start: 0, size: 10000 }
      update_attributes! filter_response_body(JSON.parse(response.body))

      self
    end
529393
public function isHtml() {
		$ext = $this->_controller->request->param('ext');
		if (empty($ext)) {
			return true;
		}

		$prefers = $this->_controller->RequestHandler->prefers();
		if (empty($prefers)) {
			$prefers = 'html';
		}

		$responseMimeType = $this->_controller->response->getMimeType($prefers);
		if (!$responseMimeType) {
			return false;
		}

		return in_array('text/html', (array)$responseMimeType);
	}
814189
def url_ok(match_tuple: MatchTuple) -> bool:
    """"""
    try:
        result = requests.get(match_tuple.link, timeout=5)
        return result.ok
    except (requests.ConnectionError, requests.Timeout):
        return False
879272
def matches_content?(element)
      return true if @content.nil?

      case @content
      when String
        element.content == @content
      when Regexp
        element.content =~ @content
      end
    end