]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_search.rhtml
Try and make browsers display the search box sanely.
[rails.git] / app / views / site / _search.rhtml
index 19b4ca2d1351d199ffa1ce31afb326e61cf0243a..d4214e8fe98b89f0e524805d8f4ea89ebdbc0f84 100644 (file)
@@ -24,7 +24,7 @@
   <% if params[:query] %>
   <%= remote_function(:loading => "startSearch()",
                       :complete => "endSearch()",
-                      :url => { :controller => :geocoder, :action => :search, :query => params[:query] }) %>
+                      :url => { :controller => :geocoder, :action => :search, :query => h(params[:query]) }) %>
   <% end %>
 // -->
 </script>
     <% form_remote_tag(:loading => "startSearch()",
                        :complete => "endSearch()",
                        :url => { :controller => :geocoder, :action => :search }) do %>
-      <%= text_field_tag :query, params[:query] %>
+      <table>
+        <tr>
+          <td width="100%"><%= text_field_tag :query, h(params[:query]) %></td>
+          <td></td>
+          <td><%= submit_tag 'Go' %></td>
+        </tr>
+      </table>
     <% end %>
     </span>
     <p id="search_active">Searching...</p>