Tuesday 30 May 2017

Best way to reverse connection.escape(str) nodejs

I'm using node with MySQL module and escaping any data inserted into the database using connection.escape. The issue I'm having is when the data escapes using a backslash it also enters the backslash into the database.

For example: Blah's Stuff when escaped inserts into the database as Blah\'s Stuff.

When I'm displaying the data, there is a backslash. What is the easiest way to reverse connection.escape(str)?



via K3NN3TH

No comments:

Post a Comment