浏览代码

[ruby/rack-sequel] Use CGI.escape_html (#10077)

For Rage this seems to be faster.
Petrik de Heus 1 周之前
父节点
当前提交
474485fe30
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      frameworks/Ruby/rack-sequel/hello_world.rb

+ 1 - 1
frameworks/Ruby/rack-sequel/hello_world.rb

@@ -70,7 +70,7 @@ class HelloWorld
       html << <<~"HTML"
       <tr>
         <td>#{fortune.id}</td>
-        <td>#{Rack::Utils.escape_html(fortune.message)}</td>
+        <td>#{CGI.escape_html(fortune.message)}</td>
       </tr>
       HTML
     end