diff --git a/nel/src/gui/html_parser.cpp b/nel/src/gui/html_parser.cpp index 80725552e..b8eb0176b 100644 --- a/nel/src/gui/html_parser.cpp +++ b/nel/src/gui/html_parser.cpp @@ -182,6 +182,16 @@ namespace NLGUI { parseNode(node->children, elm, styles, links); + if (!elm.Children.empty() && elm.ID == HTML_PRE && elm.Children.back().Type == CHtmlElement::TEXT_NODE) + { + std::string::size_type size = elm.Children.back().Value.size(); + // strip last '\n' from non-empty line + if (size > 1 && elm.Children.back().Value[size-1] == '\n') + { + elm.Children.back().Value = elm.Children.back().Value.substr(0, size - 1); + } + } + // must cleanup nested tags that libxml2 does not fix // dt without end tag: