I am currently using the following code to sanitize a string before saving it:
ERB::Util::h(string)
My problem occurs when the line has already been cleared as follows:
string = "Watching baseball `&` football"
The sanitized line will look like this:
sanitized_string = "Watching baseball `&` football"
Can I sanitize by simply turning <in <and> in >by substitution?
source
share