Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #activesupport-7.0.3/lib/active_support/core_ext/string/output_safety.rb
- 45- else
- 46: CGI.escapeHTML(ActiveSupport::Multibyte::Unicode.tidy_bytes(s))
- 47- end
- --
- 323- def explicit_html_escape_interpolated_argument(arg)
- 324: (!html_safe? || arg.html_safe?) ? arg : CGI.escapeHTML(arg.to_s)
- 325- end
- --
- 345- end
- 346: CGI.escapeHTML(arg_string)
- 347- end
- #aliyun-sdk-0.8.0/lib/aliyun/oss/protocol.rb
- 1056- object_names.each { |k|
- 1057: body << '<Object><Key>' << CGI.escapeHTML(k) << '</Key></Object>'
- 1058- }
- #awesome_print-1.9.2/lib/awesome_print/colorize.rb
- 8- def colorize(str, type)
- 9: str = CGI.escapeHTML(str) if options[:html]
- 10- if options[:plain] || !options[:color][type] || !inspector.colorize?
- #better_errors-2.9.1/lib/better_errors/error_page.rb
- 130- "<span class='unsupported'>(Instance of ignored class. "\
- 131: "#{obj.class.name ? "Remove #{CGI.escapeHTML(obj.class.name)} from" : "Modify"}"\
- 132- " BetterErrors.ignored_classes if you need to see it.)</span>"
- --
- 137- "<span class='unsupported'>(Object too large. "\
- 138: "#{obj.class.name ? "Modify #{CGI.escapeHTML(obj.class.name)}#inspect or a" : "A"}"\
- 139- "djust BetterErrors.maximum_variable_inspect_size if you need to see it.)</span>"
- 140- rescue Exception => e
- 141: "<span class='unsupported'>(exception #{CGI.escapeHTML(e.class.to_s)} was raised in inspect)</span>"
- 142- end
- #better_errors-2.9.1/lib/better_errors/inspectable_value.rb
- 21- def value_as_html
- 22: @value_as_html ||= CGI.escapeHTML(value)
- 23- end
- #brakeman-5.2.3/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers.rb
- 609- def html_escape(text)
- 610: CGI.escapeHTML(text.to_s)
- 611- end
- #brakeman-5.2.3/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/utils.rb
- 31- end
- 32: elsif defined?(CGI.escapeHTML)
- 33- # Returns an escaped copy of `html`.
- --
- 37- def escape_html(html)
- 38: CGI.escapeHTML(html.to_s)
- 39- end
- #brakeman-5.2.3/lib/brakeman/messages.rb
- 112- def to_html
- 113: "<span class=\"code\">#{CGI.escapeHTML(@code)}</span>"
- 114- end
- --
- 140- def to_html
- 141: "<span class=\"filename\">#{CGI.escapeHTML(@file)}</span>"
- 142- end
- --
- 202- def to_html
- 203: CGI.escapeHTML(@value)
- 204- end
- --
- 217- def to_html
- 218: CGI.escapeHTML(self.to_s)
- 219- end
- #brakeman-5.2.3/lib/brakeman/report/report_html.rb
- 51- template.each_output do |out|
- 52: out = CGI.escapeHTML(out_processor.format(out))
- 53- template_rows[name] ||= []
- --
- 89- warning['File'] = original.file.relative
- 90: warning['Note'] = CGI.escapeHTML(@ignore_filter.note_for(original) || "")
- 91- warning
- --
- 125- "<table id='#{code_id}' class='context' style='display:none'>" <<
- 126: "<caption>#{CGI.escapeHTML warning_file(warning) || ''}</caption>"
- 127-
- --
- 152- <td class='context'>
- 153: <pre class='context'>#{CGI.escapeHTML context.first[1].chomp}</pre>
- 154- </td>
- --
- 174- <td class='context'>
- 175: <pre class='context'>#{CGI.escapeHTML code[1].chomp}</pre>
- 176- </td>
- --
- 202-
- 203: code = "<span class=\"code\">#{CGI.escapeHTML(code).gsub("[BMP_UI]", "<span class=\"user_input\">").gsub("[/BMP_UI]", "</span>")}</span>"
- 204- full_message = "#{message}: #{code}"
- #brakeman-5.2.3/lib/brakeman/report/templates/error_overview.html.erb
- 13- <tr>
- 14: <td><%= CGI.escapeHTML warning[:error] %></td>
- 15- <td>
- #diff-lcs-1.5.0/lib/diff/lcs/htmldiff.rb
- 122-
- 123: @left.map! do |line| CGI.escapeHTML(line.chomp) end
- 124: @right.map! do |line| CGI.escapeHTML(line.chomp) end
- 125-
- #erubi-1.10.0/lib/erubi.rb
- 29- def self.h(value)
- 30: CGI.escapeHTML(value.to_s)
- 31- end
- #erubis-2.7.0/benchmark/bench.rb
- 277- tuples = [
- 278: [ 'bench_eruby.rhtml', '<%= CGI.escapeHTML((\1).to_s) %>' ],
- 279- [ 'bench_erb.rhtml', '<%=h \1 %>' ],
- #fog-aws-3.14.0/lib/fog/aws/requests/storage/delete_multiple_objects.rb
- 43- data << "<Object>"
- 44: data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
- 45: data << "<VersionId>#{CGI.escapeHTML(version_id)}</VersionId>"
- 46- data << "</Object>"
- --
- 49- data << "<Object>"
- 50: data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
- 51- data << "</Object>"
- #fog-internet-archive-0.0.2/lib/fog/storage/internet_archive/requests/delete_multiple_objects.rb
- 37- data << "<Object>"
- 38: data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
- 39- data << "</Object>"
- #gyoku-1.4.0/lib/gyoku/xml_value.rb
- 25- elsif String === object
- 26: escape_xml ? CGI.escapeHTML(object) : object
- 27- elsif object.respond_to?(:to_datetime)
- #haml-5.2.2/lib/haml/helpers.rb
- 609- def html_escape(text)
- 610: CGI.escapeHTML(text.to_s)
- 611- end
- #liquid-5.3.0/lib/liquid/standardfilters.rb
- 45- def escape(input)
- 46: CGI.escapeHTML(input.to_s) unless input.nil?
- 47- end
- #plist-3.6.0/lib/plist/generator.rb
- 86- element.sort_by{|k,v| k.to_s }.collect do |k,v|
- 87: tag('key', CGI.escapeHTML(k.to_s), level + 1) +
- 88- build(v, level + 1)
- --
- 98- when String, Symbol, Integer, Float
- 99: tag(element_type(element), CGI.escapeHTML(element.to_s), level)
- 100- when IO, StringIO
- #rails-html-sanitizer-1.4.3/test/sanitizer_test.rb
- 386- def test_should_sanitize_attributes
- 387: assert_sanitized %(<SPAN title="'><script>alert()</script>">blah</SPAN>), %(<span title="#{CGI.escapeHTML "'><script>alert()</script>"}">blah</span>)
- 388- end
- #railties-7.0.3/lib/rails/info.rb
- 45- properties.each do |(name, value)|
- 46: table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>)
- 47- formatted_value = if value.kind_of?(Array)
- 48: "<ul>" + value.map { |v| "<li>#{CGI.escapeHTML(v.to_s)}</li>" }.join + "</ul>"
- 49- else
- 50: CGI.escapeHTML(value.to_s)
- 51- end
- #rss-0.2.9/test/test_content.rb
- 19- @content_nodes = @elems.collect do |name, value|
- 20: "<#{@prefix}:#{name}>#{CGI.escapeHTML(value.to_s)}</#{@prefix}:#{name}>"
- 21- end.join("\n")
- #rss-0.2.9/test/test_syndication.rb
- 30- @sy_nodes = @elems.collect do |name, value|
- 31: "<#{@prefix}:#{name}>#{CGI.escapeHTML(value.to_s)}</#{@prefix}:#{name}>"
- 32- end.join("\n")
- --
- 53-#{make_channel(("<" + @prefix + ":" + tag.to_s + ">" +
- 54: CGI.escapeHTML(value.to_s) +
- 55- "</" + @prefix + ":" + tag.to_s + ">") * 2)}
- #rss-0.2.9/test/test_taxonomy.rb
- 34- @topics_lis.each do |value|
- 35: resource = CGI.escapeHTML(value)
- 36- @topics_node << " <rdf:li resource=\"#{resource}\"/>\n"
- --
- 72- value.each do |li|
- 73: resource = CGI.escapeHTML(li)
- 74- rv << " <rdf:li resource=\"#{resource}\"/>\n"
- #rss-0.2.9/test/test_trackback.rb
- 25- @content_nodes = @elems.collect do |name, value|
- 26: "<#{@prefix}:#{name} rdf:resource=\"#{CGI.escapeHTML(value.to_s)}\"/>"
- 27- end.join("\n")
- --
- 29- @content_nodes2 = @elems.collect do |name, value|
- 30: "<#{@prefix}:#{name}>#{CGI.escapeHTML(value.to_s)}</#{@prefix}:#{name}>"
- 31- end.join("\n")
- --
- 61-#{make_item(("<" + @prefix + ":" + tag.to_s + " rdf:resource=\"" +
- 62: CGI.escapeHTML(value.to_s) +
- 63- "\"/>") * 2)}
- --
- 72-#{make_item(("<" + @prefix + ":" + tag.to_s + " rdf:resource=\"" +
- 73: CGI.escapeHTML(value.to_s) +
- 74- "\"/>") * 2)}
- --
- 113- @elems.each do |name, value|
- 114: excepted = %Q!<#{@prefix}:#{name} rdf:resource="#{CGI.escapeHTML(value)}"/>!
- 115- @parents.each do |parent|
- #rubocop-1.31.1/lib/rubocop/formatter/html_formatter.rb
- 121- def escape(string)
- 122: CGI.escapeHTML(string)
- 123- end
- #rubygems-update-3.3.17/bundler/lib/bundler/vendor/thor/lib/thor/util.rb
- 279- def escape_html(string)
- 280: CGI.escapeHTML(string)
- 281- end
- #simplecov-html-0.12.3/views/source_file.erb
- 47-
- 48: <code class="ruby"><%= CGI.escapeHTML(line.src.chomp) %></code>
- 49- </li>
- #temple-0.8.2/lib/temple/utils.rb
- 31- end
- 32: elsif defined?(CGI.escapeHTML)
- 33- # Returns an escaped copy of `html`.
- --
- 37- def escape_html(html)
- 38: CGI.escapeHTML(html.to_s)
- 39- end
- #thor-1.2.1/lib/thor/util.rb
- 279- def escape_html(string)
- 280: CGI.escapeHTML(string)
- 281- end
- #yard-0.9.28/lib/yard/templates/helpers/html_helper.rb
- 23- def h(text)
- 24: CGI.escapeHTML(text.to_s)
- 25- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement