This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a commit to branch html_layout_title_fix
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit ffc2ab7138577bca0e4f0b0d48cacd386cce09cd
Author: Stephen Webb <[email protected]>
AuthorDate: Mon Jul 21 15:43:01 2025 +1000

    Allow a HTMLLayout title to contain characters special to HTML
---
 src/main/cpp/htmllayout.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/cpp/htmllayout.cpp b/src/main/cpp/htmllayout.cpp
index ed6e61d7..cce9c1dc 100644
--- a/src/main/cpp/htmllayout.cpp
+++ b/src/main/cpp/htmllayout.cpp
@@ -183,7 +183,7 @@ void HTMLLayout::appendHeader(LogString& output, Pool& p)
        output.append(LOG4CXX_STR("<head>"));
        output.append(LOG4CXX_EOL);
        output.append(LOG4CXX_STR("<title>"));
-       output.append(m_priv->title);
+       Transform::appendEscapingTags(output, m_priv->title);
        output.append(LOG4CXX_STR("</title>"));
        output.append(LOG4CXX_EOL);
        output.append(LOG4CXX_STR("<style type=\"text/css\">"));

Reply via email to