Double Apostrophe in SQL?
I have a form fields that allows admins to update the headers & Footers of their site and for the most part it works awesome.
Where is falls apart is anytime there is a double apostrophe with no space.
Here is the stock Tag Manager:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WN42FJV');</script>
<!-- End Google Tag Manager -->
On this line:
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
Google has:
+l:'';j.async
The 2 apostrophes, when saved in SQL come back as 1 - somewhere in the SQL process one of them is being stripped?
This only happens when there are 2 apostrophes in a row with nothing between them.
How do I fix this?
