我想转义这个表单的输入,这样当它进入数据库时,像 .'* 这样的字符不会影响更新。我将如何对字符进行编码以实现上述目标。
<% form_for @post, :url => {:action => :createInnovation } do |form| %>
<fieldset>
<p> Title: <br/><%= form.text_field :title, :html => {:class => "text ui-widget_content ui-corner-all" } %> </p>
<p> Description: <br/> <%= form.text_area :body, :html => {:class => "text ui-widget_content ui-corner-all" } %> </p>
</fieldset>
<%end%>