diff options
| author | Geoff Lankow <geoff@darktrojan.net> | 2017-12-31 02:05:38 +0000 |
|---|---|---|
| committer | Geoff Lankow <geoff@darktrojan.net> | 2017-12-31 02:30:40 +0000 |
| commit | f757f360fc176d041eb03a647a25e891214fc6a3 (patch) | |
| tree | d9b4be558e52e6cd6d236eff148b7c54cc17e870 /src | |
| parent | Back path operations to curves (diff) | |
| download | inkscape-f757f360fc176d041eb03a647a25e891214fc6a3.tar.gz inkscape-f757f360fc176d041eb03a647a25e891214fc6a3.zip | |
Escape font name when setting preview text
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 33c173a1c..078c7603c 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -367,6 +367,7 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase) return; } + Glib::ustring font_spec_escaped = Glib::Markup::escape_text( font_spec ); Glib::ustring phrase_escaped = Glib::Markup::escape_text( phrase ); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -379,7 +380,7 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase) std::ostringstream size_st; size_st << int(pt_size * PANGO_SCALE); // Markup code expects integers - Glib::ustring markup = "<span font=\'" + font_spec + + Glib::ustring markup = "<span font=\'" + font_spec_escaped + "\' size=\'" + size_st.str() + "\'>" + phrase_escaped + "</span>"; preview_label.set_markup(markup.c_str()); |
