When importing questions (in this case in Blackboard format), the question names are generated from the question text if not provided. The question name is truncated by character length, but if question text contains HTML, the character boundary can occur within an HTML tag and create an invalid question name. In this case, Moodle gives the error, "Cannot insert question". I realize there are many different solutions to this "problem." The attached patch is the path we have chosen, but we would much prefer to adopt a change from upstream.