Avoid removing empty spans that carry template data

Inline span['data-mw'] (like img) if it only contains
whitespace characters

Bug: 69885
Change-Id: I430897d1ca0c40afe1591c840c11d449c29b83db