If there is a question mark or a quotation mark in the data retrieved in the where statement in Rails, it will be escaped and
and so on.
When viewing it in view, I solved it by doing .html_safe in the view.
I don't know what to do if I want to use the data I got directly from the processing in the controller (which I wrote to the delayed_job job).
Specifically, I would like to use the retrieved data as a search word using an API, but I would like to use the string before escaping.
row['title'] display the same.
row['title'].class is string.
Thank you for your cooperation.ruby-on-rails
As far as Rails/ActiveRecord is being used honestly, data imported from the database will not be escaped on its own.
When you say that it appears as escaped in , either the data stored in the DB has already been escaped, or it has been intentionally created to do extra escape somewhere.
Also, don't do
.html_safe in the dark.
© 2023 OneMinuteCode. All rights reserved.