JSでオブジェクトのすべての属性をエスケープするにはどうすればよいですか?
var literal = {
valid:'thisIsAValidValue',
toEscape:'ThîsStringNéédsToBéEscàped'
};
//Does not work
escape(literal)
//Does not work either, how to loop over attributes?
$.each(literal.attributes, function(){
this = escape(this);
});