module CGI::Util
Constants
- RFC822_DAYS
-
Abbreviated day-of-week names specified by RFC 822
- RFC822_MONTHS
-
Abbreviated month names specified by RFC 822
- TABLE_FOR_ESCAPE_HTML__
-
The set of special characters and their escaped values
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/cgi/0/core.rbs, line 887
def pretty: (string string, ?String shift) -> String
Prettify (indent) an HTML string.
string is the HTML string to indent. shift is the indentation unit to use; it defaults to two spaces.
print CGI.pretty("<HTML><BODY></BODY></HTML>") # <HTML> # <BODY> # </BODY> # </HTML> print CGI.pretty("<HTML><BODY></BODY></HTML>", "\t") # <HTML> # <BODY> # </BODY> # </HTML>