Where the replacement parameters don't have spaces in them. Too lazy to escape them on here
I figured out that this works nicely.
string = string.replace(/&/g, '& a m p;').replace(/< /g, '& l t ;').replace(/>/g, '& g t;').replace(/"/g, '& q u o t;');
Please let me know if this is still buggy
I used Appery('').append() where I pass in a custom built DOM object (string). Could you tell me how the Apperyio().text() prevents this?