I have a database, and currently many of the items within it have been html escaped. I need to undo this (don't ask why!), for which I'll carry out a data migration.
But is the a way to un-escape these strings? I've not been able to find anything..
I have a database, and currently many of the items within it have been html escaped. I need to undo this (don't ask why!), for which I'll carry out a data migration.
But is the a way to un-escape these strings? I've not been able to find anything..
Ruby's CGI::unescapeHTML can do HTML unescaping.
Unescape a string that has been HTML-escaped
CGI::unescapeHTML("Usage: foo "bar" <baz>")
# => "Usage: foo \"bar\" <baz>"
If i understand it correct you need to replace strings like
>
to>
. If so - check xml documentation and replace required strings with their real values. I dont code in ruby, so this one you got to figure out :] XML special characters