Potrebbe essere un problema apici (') o virgolette (") che se non "filtrate" a dovere \' o \" vengono interpretate come fine stringa.


P.S. Il repalce asp va fatto solo se inserisci il testo in un database, e non inviare testi/stringhe eccessivamente lunghi più di 300/400 caratteri