(imported comment written by SystemAdmin)
If you take the string after != and replace all " with %22 (including ones at beginning and end), replace the % with %25 (as you did), then wrap the whole thing in double-quotes.
Hopefully that should work for you.