$ 0 0 Thanks Janesh, .replace(/&/g,'&').replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>'); helped a lot!