html2domly: fix syntax and runtime errors.