Correctly handling empty values of HTML editor