1 Reply Latest reply on Sep 14, 2010 5:19 PM by CharlesBroughton_112

    URGENT : Textarea Copy-Paste

    Arsohoh Level 1

      Hi all,

       

      When I copy a text with apostrophe (') from the MS-Word doc to the text area and updating the DB updates the data as null.

       

      Eg, Say the text is " The Test Data for apos's test " that is copied from MS-Word and pasted in text area and on updating the DB , the data in DB is updated as null.

       

      Please let me know this.

        • 1. Re: URGENT : Textarea Copy-Paste
          CharlesBroughton_112

          This answer is a bit too obvious to me, as I work with MySQL quite a bit; which means it's probably the wrong answer.  Try it anyway.

           

          I know in MySQL, the apostrophe character, quote character, and back tick characters are all used for SPECIAL cases, as are backslashes.  All of the above MUST be escaped (with a preceding backslash) before it can be fed to the database as a query, or it will be errorous, and may cause INJECTION EXPLOITABLE...)

           

          Example:

          This "data" is what 'will' be put in `the database`. (\\lol)

           

          MUST BE ESCAPED TO:

          This \"data\" is what \'will\' be put in \`the database\`. (\\\\lol)

           

          Before it can be fed into MySQL

          1 person found this helpful