Loading editor/htmlimport.cpp +2 −4 Changes for editor/htmlimport.cpp: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -732,16 +732,14 @@ bool blogi::htmlimport::convertHtmlToWidgetXml(const std::string &html, xmlRoot->SetAttribute("editor", "blogi"); xmlDoc.InsertEndChild(xmlRoot); std::string safeHtml = sanitizeHtml(html); try { page.loadString(index, safeHtml); page.loadString(index, html); root = &index; } catch (...) { // Fallback: single CustomHtml widget with raw HTML tinyxml2::XMLElement *w = xmlDoc.NewElement("CustomHtml"); tinyxml2::XMLElement *htmlContent = xmlDoc.NewElement("HtmlContent"); htmlContent->SetText(safeHtml.c_str()); htmlContent->SetText(html.c_str()); w->InsertEndChild(htmlContent); xmlRoot->InsertEndChild(w); Loading Loading
editor/htmlimport.cpp +2 −4 Changes for editor/htmlimport.cpp: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -732,16 +732,14 @@ bool blogi::htmlimport::convertHtmlToWidgetXml(const std::string &html, xmlRoot->SetAttribute("editor", "blogi"); xmlDoc.InsertEndChild(xmlRoot); std::string safeHtml = sanitizeHtml(html); try { page.loadString(index, safeHtml); page.loadString(index, html); root = &index; } catch (...) { // Fallback: single CustomHtml widget with raw HTML tinyxml2::XMLElement *w = xmlDoc.NewElement("CustomHtml"); tinyxml2::XMLElement *htmlContent = xmlDoc.NewElement("HtmlContent"); htmlContent->SetText(safeHtml.c_str()); htmlContent->SetText(html.c_str()); w->InsertEndChild(htmlContent); xmlRoot->InsertEndChild(w); Loading