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

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

commit 0b3749504f0f1bd83ca8a7b391687fdfcd1f94a6
Author: Stephen Webb <swebb2...@gmail.com>
AuthorDate: Thu Jul 24 11:18:34 2025 +1000

    Escape any logger name '&' or '"' in html attribute data
---
 src/main/cpp/htmllayout.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/cpp/htmllayout.cpp b/src/main/cpp/htmllayout.cpp
index cce9c1dc..f1b2747c 100644
--- a/src/main/cpp/htmllayout.cpp
+++ b/src/main/cpp/htmllayout.cpp
@@ -98,9 +98,9 @@ void HTMLLayout::format(LogString& output,
 
        output.append(LOG4CXX_STR("<td title=\""));
        LogString threadName(event->getThreadName());
-       output.append(threadName);
+       Transform::appendEscapingTags(output, threadName);
        output.append(LOG4CXX_STR(" thread\">"));
-       output.append(threadName);
+       Transform::appendEscapingTags(output, threadName);
        output.append(LOG4CXX_STR("</td>"));
        output.append(LOG4CXX_EOL);
 

Reply via email to