@@ -674,6 +674,9 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
674674 LOG_TRC (" css_variables=" << cssVars);
675675 const std::string postMessageOrigin = form.get (" postmessage_origin" , " " );
676676 LOG_TRC (" postmessage_origin" << postMessageOrigin);
677+ const std::string theme = form.get (" theme" , " " );
678+ LOG_TRC (" theme=" << theme);
679+
677680 // Escape bad characters in access token.
678681 // This is placed directly in javascript in loleaflet.html, we need to make sure
679682 // that no one can do anything nasty with their clever inputs.
@@ -725,8 +728,9 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
725728 protocolDebug = " true" ;
726729 Poco::replaceInPlace (preprocess, std::string (" %PROTOCOL_DEBUG%" ), protocolDebug);
727730
728- static const std::string linkCSS (" <link rel=\" stylesheet\" href=\" %s/loleaflet/" LOOLWSD_VERSION_HASH " /%s.css\" >" );
729- static const std::string scriptJS (" <script src=\" %s/loleaflet/" LOOLWSD_VERSION_HASH " /%s.js\" ></script>" );
731+ std::string themePreFix = (theme == " " ) ? " " : theme + " _" ;
732+ static const std::string linkCSS (" <link rel=\" stylesheet\" href=\" %s/loleaflet/" LOOLWSD_VERSION_HASH " /" + themePreFix + " %s.css\" >" );
733+ static const std::string scriptJS (" <script src=\" %s/loleaflet/" LOOLWSD_VERSION_HASH " /" + themePreFix + " %s.js\" ></script>" );
730734
731735 std::string brandCSS (Poco::format (linkCSS, responseRoot, std::string (BRANDING)));
732736 std::string brandJS (Poco::format (scriptJS, responseRoot, std::string (BRANDING)));
0 commit comments