2 # frozen_string_literal: true
5 - script: CGI.escapeHTML("")
7 - script: CGI.escapeHTML("abcde")
9 - script: CGI.escapeHTML("abcd<")
11 - script: CGI.escapeHTML("'&\"<>")
13 - prelude: long_no_escape = "abcde" * 300
14 script: CGI.escapeHTML(long_no_escape)
16 - prelude: long_all_escape = "'&\"<>" * 10
17 script: CGI.escapeHTML(long_all_escape)
19 - prelude: | # http://example.com/
20 example_html = <<~HTML
23 <h1>Example Domain</h1>
24 <p>This domain is established to be used for illustrative examples in documents. You may use this
25 domain in examples without prior coordination or asking for permission.</p>
26 <p><a href="http://www.iana.org/domains/example">More information...</a></p>
30 script: CGI.escapeHTML(example_html)