mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
escape markup text that may contain non-legal characters (for GMarkup). this may need to be done more widely
git-svn-id: svn://localhost/ardour2/branches/3.0@13318 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
948fd683cd
commit
a541e4e811
3 changed files with 4 additions and 4 deletions
|
|
@ -1009,10 +1009,10 @@ PortMatrix::update_tab_highlighting ()
|
||||||
string c = label->get_label ();
|
string c = label->get_label ();
|
||||||
if (c.length() && c[0] == '<' && !has_connection) {
|
if (c.length() && c[0] == '<' && !has_connection) {
|
||||||
/* this label is marked up with <b> but shouldn't be */
|
/* this label is marked up with <b> but shouldn't be */
|
||||||
label->set_markup ((*j)->name);
|
label->set_text ((*j)->name);
|
||||||
} else if (c.length() && c[0] != '<' && has_connection) {
|
} else if (c.length() && c[0] != '<' && has_connection) {
|
||||||
/* this label is not marked up with <b> but should be */
|
/* this label is not marked up with <b> but should be */
|
||||||
label->set_markup (string_compose ("<b>%1</b>", (*j)->name));
|
label->set_markup (string_compose ("<b>%1</b>", Glib::Markup::escape_text ((*j)->name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
++p;
|
++p;
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ SoundFileBox::setup_labels (const string& filename)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
preview_label.set_markup (string_compose ("<b>%1</b>", Glib::path_get_basename (filename)));
|
preview_label.set_markup (string_compose ("<b>%1</b>", Glib::Markup::escape_text (Glib::path_get_basename (filename))));
|
||||||
std::string n = sf_info.format_name;
|
std::string n = sf_info.format_name;
|
||||||
if (n.substr (0, 8) == X_("Format: ")) {
|
if (n.substr (0, 8) == X_("Format: ")) {
|
||||||
n = n.substr (8);
|
n = n.substr (8);
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ void
|
||||||
Splash::message (const string& msg)
|
Splash::message (const string& msg)
|
||||||
{
|
{
|
||||||
string str ("<b>");
|
string str ("<b>");
|
||||||
str += msg;
|
str += Glib::Markup::escape_text (msg);
|
||||||
str += "</b>";
|
str += "</b>";
|
||||||
|
|
||||||
layout->set_markup (str);
|
layout->set_markup (str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue