escape / 0.2
| Short description: | URI/HTML/shell escaping utilities | |||||
|---|---|---|---|---|---|---|
| Category: | Library/Text | |||||
| Status: | experimental | |||||
| Created: | 2007-02-28 10:19:04 GMT | |||||
| Last update: | 2007-02-28 10:19:04 GMT | |||||
| Owner: | akr (Projects of this owner) | |||||
| Homepage: | http://www.a-k-r.org/escape/ | |||||
| Download: | http://www.a-k-r.org/escape/ | |||||
| License: | BSD | |||||
| Dependency: |
|
|||||
| Description: |
escape - HTML/URI/shell escaping utilitiesescape library provides several HTML/URI/shell escaping functions. Feature
Usagerequire 'escape'
Escape.shell_command(["echo", "*"]) #=> #<Escape::ShellEscaped: echo '*'>
Escape.uri_path("a?b/c?d/e?f") #=> #<Escape::PercentEncoded: a%3Fb/c%3Fd/e%3Ff>
Escape.html_form([["a","b"], ["c","d"]]) #=> #<Escape::PercentEncoded: a=b&c=d>
Escape.html_form({"a"=>"b", "c"=>"d"}) #=> #<Escape::PercentEncoded: a=b&c=d>
Escape.html_text("a & b < c > d") #=> #<Escape::HTMLEscaped: a & b < c > d>
Escape.html_attr_value("ab&<>\"c") #=> #<Escape::HTMLAttrValue: "ab&<>"c"> |
|||||