- string len = space_.asHTMLLength();
- if (len.empty())
- // we didn't understand it
- os << "<br />\n";
- else
- os << "<div style='height:" << from_ascii(len) << "'></div>\n";
- return docstring();
+ odocstringstream ods;
+ XHTMLStream xds(ods);
+ string const len = space_.asHTMLLength();
+ string const attr = "style='height:" + (len.empty() ? "1em" : len) + "'";
+ xds << html::StartTag("div", attr, true) << html::EndTag("div");
+ return ods.str();