Loading plugins/staticpage/static.cpp +12 −1 Changes for plugins/staticpage/static.cpp: 12 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -433,6 +433,10 @@ json_object* blogi::StaticPage::editPage(const int tid, libhttppp::HttpRequest& Args->database[tid]->exec(sql, res); sql.clear(); } } catch (libhtmlpp::HTMLException &e) { libhttppp::HTTPException excep; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } catch (const std::exception& e) { libhttppp::HTTPException excep; excep[libhttppp::HTTPException::Error] << e.what(); Loading Loading @@ -527,7 +531,14 @@ bool blogi::StaticPage::Controller(const int tid,libhttppp::HttpRequest &req,lib << res[0][1] << "</div>"; page->getElementbyID("main")->insertChild(condat.parse());; try { page->getElementbyID("main")->insertChild(condat.parse()); } catch(libhtmlpp::HTMLException &e) { std::cerr << "staticpage: HTML error in '" << surl << "': " << e.what() << std::endl; libhtmlpp::HtmlString fallback; fallback << "<div id=\"content\" class=\"staticpage\"><p>HTML Rendering Error</p></div>"; page->getElementbyID("main")->insertChild(fallback.parse()); } libhtmlpp::HtmlElement canon("link"); Loading Loading
plugins/staticpage/static.cpp +12 −1 Changes for plugins/staticpage/static.cpp: 12 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -433,6 +433,10 @@ json_object* blogi::StaticPage::editPage(const int tid, libhttppp::HttpRequest& Args->database[tid]->exec(sql, res); sql.clear(); } } catch (libhtmlpp::HTMLException &e) { libhttppp::HTTPException excep; excep[libhttppp::HTTPException::Error] << e.what(); throw excep; } catch (const std::exception& e) { libhttppp::HTTPException excep; excep[libhttppp::HTTPException::Error] << e.what(); Loading Loading @@ -527,7 +531,14 @@ bool blogi::StaticPage::Controller(const int tid,libhttppp::HttpRequest &req,lib << res[0][1] << "</div>"; page->getElementbyID("main")->insertChild(condat.parse());; try { page->getElementbyID("main")->insertChild(condat.parse()); } catch(libhtmlpp::HTMLException &e) { std::cerr << "staticpage: HTML error in '" << surl << "': " << e.what() << std::endl; libhtmlpp::HtmlString fallback; fallback << "<div id=\"content\" class=\"staticpage\"><p>HTML Rendering Error</p></div>"; page->getElementbyID("main")->insertChild(fallback.parse()); } libhtmlpp::HtmlElement canon("link"); Loading