As some have pointed, the browser interpretation of an empty element can vary. If you would like to ignore invisible elements such as spaces and line breaks and make the implementation more consistent you can create a function (or just use the code inside of it).
Attachments

Sample txt

You don't have permission to download attachments.

( 1 Kb) Downloaded 0 times