dom-parser icon indicating copy to clipboard operation
dom-parser copied to clipboard

getElementById('id').outerHTML is skipping empty spaces before closing tags

Open sudipstha08 opened this issue 5 years ago • 1 comments

sudipstha08 avatar Jun 09 '20 05:06 sudipstha08

<div id="id123">Built with <a href="http://ajarproductions.com/pages/products/in5/?ref=footer" target="_blank" >In5</a>.</div>

Theres a empty space at the end of opening a tag just after "_blank". But getElementById('id123').outerHTML returns the div without that space.

sudipstha08 avatar Jun 09 '20 05:06 sudipstha08

Hi, @sudipstha08 ! Thank you for highlighting that. Indeed, this works like you mentioned, but it works similarly in a browser. In terms of the purpose of this library, this space only matters a little. Let me know If you have a particular case in which you experience a problem with the current implementation.

ershov-konst avatar Nov 12 '23 14:11 ershov-konst