Performance, safety is not a factor, it is only important that it works and is dedicated to the shortest possible time.
— Okay, encoding stuff unneccessarily is not performant, neither is constructing DOM objeccts from HTML strings
Message permanent page
— So encoding first, then remove HTML strings and replace with JSON or msgpack
— Var o = JSON.parse(datos);
— It's very rare that you need to sacrifice performance for safety
— It's often the opposite
— Performance and safety usually go hand in hand
— Okaaay, this makes even less sense now
— Datos is already a JS variable?
— It's just a small detail and not wanting to change many things as they are the final touches