Escape angled brackets in playlist names for tooltips.

git-svn-id: svn://localhost/ardour2/branches/3.0@12672 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-06-12 14:19:35 +00:00
parent 1804efbd14
commit d7551a8f08
3 changed files with 18 additions and 2 deletions

View file

@ -36,6 +36,7 @@
#include <gtkmm/label.h>
#include <gtkmm/paned.h>
#include <gtk/gtkpaned.h>
#include <boost/algorithm/string.hpp>
#include "pbd/file_utils.h"
@ -680,6 +681,16 @@ escape_underscores (string const & s)
return o;
}
/** Replace < and > with &lt; and &gt; respectively to make < > display correctly in markup strings */
string
escape_angled_brackets (string const & s)
{
string o = s;
boost::replace_all (o, "<", "&lt;");
boost::replace_all (o, ">", "&gt;");
return o;
}
Gdk::Color
unique_random_color (list<Gdk::Color>& used_colors)
{