Răsfoiți Sursa

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

For Rage this seems to be faster.
Petrik de Heus 1 săptămână în urmă
părinte
comite
474485fe30
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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