Fixed sorting of formatted numbers in HTML tags (fixes #5239)