This might not be entirely correct, but neither was using the completely ad-hoc parse_html_length(), and this is the last user of that API so let's move off of it.