// create new top level document tree
DocumentTree (std::string title, std::string stub = "") {
- this->title = title;
+ this->title = escape_html (title);
// if stub is not empty set it
if (stub != "")
this->stub = stub;
// set the title
void set_title (std::string title) {
- this->title = title;
+ this->title = escape_html (title);
// if no stub is set
if (this->stub == "")
this->stub = convert_title (title);