72件ヒット
[1-72件を表示]
(0.008秒)
ライブラリ
-
cgi
/ util (72)
キーワード
- escape (12)
- escapeElement (12)
-
escape
_ element (12) - unescape (12)
- unescapeElement (12)
-
unescape
_ element (12)
検索結果
先頭5件
-
CGI
. escape(string) -> String (47.0) -
与えられた文字列を URL エンコードした文字列を新しく作成し返します。
...を URL エンコードした文字列を新しく作成し返します。
@param string URL エンコードしたい文字列を指定します。
例:
require "cgi"
p CGI.escape('@##') #=> "%40%23%23"
url = "http://www.example.com/register?url=" +
CGI.escap......e('http://www.example.com/index.rss')
p url
#=> "http://www.example.com/register?url=http%3A%2F%2Fwww.example.com%2Findex.rss"... -
CGI
. escapeElement(string , *elements) -> String (25.0) -
第二引数以降に指定したエレメントのタグだけを実体参照に置換します。
...ことも出来ます。
例:
require "cgi"
p CGI.escapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"
p CGI.escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
# => "<BR><A HREF="url"></A>"... -
CGI
. escape _ element(string , *elements) -> String (25.0) -
第二引数以降に指定したエレメントのタグだけを実体参照に置換します。
...ことも出来ます。
例:
require "cgi"
p CGI.escapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"
p CGI.escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
# => "<BR><A HREF="url"></A>"... -
CGI
. unescapeElement(string , *elements) -> String (25.0) -
特定の要素だけをHTMLエスケープから戻す。
...:
require "cgi"
print CGI.unescapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"
print CGI.unescapeElement('<BR><A HREF="url"></A>', %w(A IMG))
# => "<BR><A HREF="url"></A>"... -
CGI
. unescape _ element(string , *elements) -> String (25.0) -
特定の要素だけをHTMLエスケープから戻す。
...:
require "cgi"
print CGI.unescapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"
print CGI.unescapeElement('<BR><A HREF="url"></A>', %w(A IMG))
# => "<BR><A HREF="url"></A>"... -
CGI
. unescape(string) -> String (23.0) -
与えられた文字列を URL デコードした文字列を新しく作成し返します。
...与えられた文字列を URL デコードした文字列を新しく作成し返します。
@param string URL エンコードされている文字列を指定します。
require "cgi"
p CGI.unescape('%40%23%23') #=> "@##"
p CGI.unescape("http%3A%2F%2Fwww.example.c...