database - Escaping Characters Rails -
I want to escape from the input in this form so that when entering database characters. * * Will not be affected New How do I encode the characters to get the above mentioned target
& lt;% form_for @ post ,: url = & gt; {: Action = & gt; : CreateInnovation} | Farm | & Gt%; & Lt; Fieldset & gt; & Lt; P & gt; Title: & lt; Br / & gt; & Lt;% = form.text_field: title,: html = & gt; {: Class = & gt; "Text ui-widget_content ui-corner-all"}%> & Lt; / P & gt; & Lt; P & gt; Details: & lt; Br / & gt; & Lt;% = form.text_area: body ,: html = & gt; {: Class = & gt; "Text ui-widget_content ui-corner-all"}%> & Lt; / P & gt; & Lt; / Fieldset & gt; & Lt;% end% & gt; In order to prevent SQL injection, ActiveRecord will automatically avoid any characters as any character
Are you worried about this? If so, the train has covered you.
Comments
Post a Comment