[core] Replace Application name/friendly_name std::string with StringRef (#14532)

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2026-03-06 06:58:13 -10:00
committed by GitHub
co-authored by Copilot
parent 07e51886f3
commit 74e4b69654
14 changed files with 181 additions and 41 deletions
@@ -75,7 +75,7 @@ void WebServer::set_js_url(const char *js_url) { this->js_url_ = js_url; }
void WebServer::handle_index_request(AsyncWebServerRequest *request) {
AsyncResponseStream *stream = request->beginResponseStream(ESPHOME_F("text/html"));
const std::string &title = App.get_name();
const auto &title = App.get_name();
stream->print(ESPHOME_F("<!DOCTYPE html><html lang=\"en\"><head><meta charset=UTF-8><meta "
"name=viewport content=\"width=device-width, initial-scale=1,user-scalable=no\"><title>"));
stream->print(title.c_str());