GIF87a;
#-- # htmlutils.rb -- HTMLUtils Module # # Author: IPR -- Internet Programming with Ruby -- writers # Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou # Copyright (c) 2002 Internet Programming with Ruby writers. All rights # reserved. # # $IPR: htmlutils.rb,v 1.7 2002/09/21 12:23:35 gotoyuzo Exp $ module WEBrick module HTMLUtils ## # Escapes &, ", > and < in +string+ def escape(string) return "" unless string str = string.b str.gsub!(/&/n, '&') str.gsub!(/\"/n, '"') str.gsub!(/>/n, '>') str.gsub!(/</n, '<') str.force_encoding(string.encoding) end module_function :escape end end
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
httpauth | Folder | 0755 |
|
|
httpservlet | Folder | 0755 |
|
|
accesslog.rb | File | 4.31 KB | 0644 |
|
cgi.rb | File | 7.97 KB | 0644 |
|
compat.rb | File | 912 B | 0644 |
|
config.rb | File | 5.56 KB | 0644 |
|
cookie.rb | File | 3.88 KB | 0644 |
|
htmlutils.rb | File | 680 B | 0644 |
|
httpauth.rb | File | 3.33 KB | 0644 |
|
httpproxy.rb | File | 9.65 KB | 0644 |
|
httprequest.rb | File | 14.7 KB | 0644 |
|
httpresponse.rb | File | 11 KB | 0644 |
|
https.rb | File | 1.87 KB | 0644 |
|
httpserver.rb | File | 7.69 KB | 0644 |
|
httpservlet.rb | File | 669 B | 0644 |
|
httpstatus.rb | File | 5.13 KB | 0644 |
|
httputils.rb | File | 12.71 KB | 0644 |
|
httpversion.rb | File | 1.57 KB | 0644 |
|
log.rb | File | 3.96 KB | 0644 |
|
server.rb | File | 8.42 KB | 0644 |
|
ssl.rb | File | 6.67 KB | 0644 |
|
utils.rb | File | 6.44 KB | 0644 |
|
version.rb | File | 384 B | 0644 |
|