Why is an apostrophe appearing as ' in Ruby on Rails and is this a sign of a security issue?
- 阅读更多 关于 Why is an apostrophe appearing as ' in Ruby on Rails and is this a sign of a security issue?
问题 I'm new to Ruby on Rails and I'm using a form_helper to create and update records. In the form below, I'm collecting information to save data for maps that users can create. The :name field is the name that user gives to a map. It's saved to a MySQL table into a field that is varchar(255). If I name a map "John's Map", it appears in both the database and in the view as John's Map How can I prevent this from happening, and is my code susceptible to SQL injection with this approach? I've seen