summaryrefslogtreecommitdiff
path: root/lib/cgi.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 04:32:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 04:32:24 +0000
commitc1bbe10599dfcc2dca3823dc0784eb1835c1ed74 (patch)
treecf8d2904f1e9ba1a42b0e68e59571e97c3695f2b /lib/cgi.rb
parenta3edeb5fec3dfb064a1745881f5c5ec68e2abc92 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi.rb')
-rw-r--r--lib/cgi.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 7f40c3a0f6..1b55f0ac95 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -939,7 +939,7 @@ convert string charset, and set language to "ja".
start_pos = lines.rindex(/^\s*<#{element}/ni, end_pos)
lines[start_pos ... end_pos] = "__" + lines[start_pos ... end_pos].gsub(/\n(?!\z)/n, "\n" + shift) + "__"
end
- lines.gsub(/^(\s*)__(?=<\/?\w)/n, '\1')
+ lines.gsub(/^((?:#{Regexp::quote(shift)})*)__(?=<\/?\w)/n, '\1')
end