mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +00:00
IRCClient: Escape HTML entities in nicknames, too, just in case
This commit is contained in:
parent
68e23bca3f
commit
d6f9349f15
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ static String timestamp_string()
|
|||
|
||||
void IRCLogBuffer::add_message(char prefix, const String& name, const String& text, Color color)
|
||||
{
|
||||
auto nick_string = String::format("<%c%s> ", prefix ? prefix : ' ', name.characters());
|
||||
auto nick_string = String::format("<%c%s> ", prefix ? prefix : ' ', name.characters());
|
||||
auto html = String::format(
|
||||
"<div style=\"color: %s\">"
|
||||
"<span>%s</span>"
|
||||
|
@ -53,7 +53,7 @@ void IRCLogBuffer::add_message(char prefix, const String& name, const String& te
|
|||
"</div>",
|
||||
color.to_string().characters(),
|
||||
timestamp_string().characters(),
|
||||
nick_string.characters(),
|
||||
escape_html_entities(nick_string).characters(),
|
||||
escape_html_entities(text).characters());
|
||||
auto fragment = parse_html_fragment(*m_document, html);
|
||||
m_container_element->append_child(fragment->remove_child(*fragment->first_child()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue