There is a utility method in `html_utils.dart` which can replace these two lines.