End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
CGI::Util#unescape_element
unescape_element(string, *elements)
lib/cgi/util.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/cgi/util.rb, line 198
def unescapeElement(string, *elements)
elements = elements[0] if elements[0].kind_of?(Array)
unless elements.empty?
string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do
unescapeHTML($&)
end
else
string
end
end
Alias of #unescapeElement
Synonym for CGI.unescapeElement(str)