Skip to content

Commit

Permalink
Merge pull request #3827 from pope/master
Browse files Browse the repository at this point in the history
Escape markup characters in dwl/window
  • Loading branch information
Alexays authored Dec 26, 2024
2 parents 6ce881a + 157ea44 commit 5346649
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/modules/dwl/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "client.hpp"
#include "dwl-ipc-unstable-v2-client-protocol.h"
#include "glibmm/markup.h"
#include "util/rewrite_string.hpp"

namespace waybar::modules::dwl {
Expand Down Expand Up @@ -97,11 +98,17 @@ Window::~Window() {
}
}

void Window::handle_title(const char *title) { title_ = title; }
void Window::handle_title(const char *title) {
title_ = Glib::Markup::escape_text(title);
}

void Window::handle_appid(const char *appid) { appid_ = appid; }
void Window::handle_appid(const char *appid) {
appid_ = Glib::Markup::escape_text(appid);
}

void Window::handle_layout_symbol(const char *layout_symbol) { layout_symbol_ = layout_symbol; }
void Window::handle_layout_symbol(const char *layout_symbol) {
layout_symbol_ = Glib::Markup::escape_text(layout_symbol);
}

void Window::handle_layout(const uint32_t layout) { layout_ = layout; }

Expand Down

0 comments on commit 5346649

Please sign in to comment.