Trim whitespace from html_to_element input.

This commit is contained in:
voussoir 2020-09-12 20:33:46 -07:00
parent 188095c30b
commit 329c6dd27b

View file

@ -169,8 +169,8 @@ common.html_to_element =
function html_to_element(html) function html_to_element(html)
{ {
let template = document.createElement("template"); let template = document.createElement("template");
template.innerHTML = html; template.innerHTML = html.trim();
return template.content.firstChild; return template.content.firstElementChild;
} }
common.init_atag_merge_params = common.init_atag_merge_params =