فهرست منبع

[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"
       html << <<~"HTML"
       <tr>
       <tr>
         <td>#{fortune.id}</td>
         <td>#{fortune.id}</td>
-        <td>#{Rack::Utils.escape_html(fortune.message)}</td>
+        <td>#{CGI.escape_html(fortune.message)}</td>
       </tr>
       </tr>
       HTML
       HTML
     end
     end