F
Flyzone
Hello, i'm trying to paste copied text from word into an input box.
This text is saved into a oracle db and then used as text in another
javascript.
The problem is that using the saved text (encoded and decoded in the
db to avoid sql injection) have some special char that block the
javascript execution (i think is unicode char).
So i would like to detect and delete this char with a javascript
function (i can't disable copy and paste), cause if i paste the text
copied in word into window notepad and then i copy from notepad ad i
paste again in my form i don't have problem.
Until now i used:
re = /\$|,|`|\'|\||\\|\!|\./g;
return str.replace(re, "");
But is impossible to put all chars; does exist any function that
detect if a char is unicode or plain text, or a paste special?
Thanks in advance
This text is saved into a oracle db and then used as text in another
javascript.
The problem is that using the saved text (encoded and decoded in the
db to avoid sql injection) have some special char that block the
javascript execution (i think is unicode char).
So i would like to detect and delete this char with a javascript
function (i can't disable copy and paste), cause if i paste the text
copied in word into window notepad and then i copy from notepad ad i
paste again in my form i don't have problem.
Until now i used:
re = /\$|,|`|\'|\||\\|\!|\./g;
return str.replace(re, "");
But is impossible to put all chars; does exist any function that
detect if a char is unicode or plain text, or a paste special?
Thanks in advance