mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 14:42:29 +02:00
@ -6,7 +6,7 @@
|
||||
namespace waybar::util {
|
||||
// replaces ``<>&"'`` with their encoded counterparts
|
||||
std::string sanitize_string(std::string str) {
|
||||
// note: it's important that '&' is replaced first; therefor we *can't* use std::map
|
||||
// note: it's important that '&' is replaced first; therefore we *can't* use std::map
|
||||
const std::pair<char, std::string> replacement_table[] = {
|
||||
{'&', "&"}, {'<', "<"}, {'>', ">"}, {'"', """}, {'\'', "'"}};
|
||||
size_t startpoint;
|
||||
|
Reference in New Issue
Block a user