X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=include%2Fhttp%2Fipagehandler.h;h=d0c585683b02d945b722f2c2c203a0f3d0db0dce;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hp=16afb7c25333d65ddb47c27a4b3c9f1ccf0470c2;hpb=221236a4d3aac4144529d418ce368db5c98facb0;p=fms.git diff --git a/include/http/ipagehandler.h b/include/http/ipagehandler.h index 16afb7c..d0c5856 100644 --- a/include/http/ipagehandler.h +++ b/include/http/ipagehandler.h @@ -2,6 +2,7 @@ #define _ipagehandler_ #include "../ilogger.h" +#include "../idatabase.h" #include #include @@ -12,11 +13,11 @@ #include #include -class IPageHandler:public Poco::Net::HTTPRequestHandler,public ILogger +class IPageHandler:public Poco::Net::HTTPRequestHandler,public ILogger,public IDatabase { public: - IPageHandler() {} - IPageHandler(const std::string &templatestr, const std::string &pagename):m_template(templatestr),m_pagename(pagename) { } + IPageHandler(SQLite3DB::DB *db):IDatabase(db) {} + IPageHandler(SQLite3DB::DB *db, const std::string &templatestr, const std::string &pagename):IDatabase(db),m_template(templatestr),m_pagename(pagename) { } virtual ~IPageHandler() {} virtual const bool WillHandleURI(const std::string &uri); @@ -39,6 +40,8 @@ protected: // replaces html elements with encoded characters (i.e. < becomes <) const std::string SanitizeOutput(const std::string &input); + // don't replace space with  , because browser might convert to unicode non breaking space character + const std::string SanitizeTextAreaOutput(const std::string &input); std::string m_template; std::string m_pagename;