Open xBZZZZ opened 1 year ago
also DOMParser
:
console.log(new DOMParser().parseFromString('<x>\r\n</x>','application/xml').documentElement.textContent.length);//logs 1
but
console.log(new DOMParser().parseFromString('<x> </x>','application/xml').documentElement.textContent.length);//logs 2
'\r\n'
→'\n'
'\r'
→'\n'
~this is bad because doing nothing and pressingback
in many dialogs can actually change stuff!~