Skip to content

Commit

Permalink
Fix double escaping of image overlay text.
Browse files Browse the repository at this point in the history
Bug 2051955, reported by Emmanuel Dupuis.
  • Loading branch information
Laurent Monin committed Aug 16, 2008
1 parent 8fc4646 commit f060695
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/image-overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
typedef enum {
OSDT_NONE = 0,
OSDT_FREE = 1 << 0,
OSDT_NO_ESCAPE = 1 << 1,
OSDT_NO_DUP = 1 << 2
OSDT_NO_DUP = 1 << 1
} OsdTemplateFlags;

static void osd_template_insert(GHashTable *vars, gchar *keyword, gchar *value, OsdTemplateFlags flags)
Expand All @@ -431,13 +430,9 @@ static void osd_template_insert(GHashTable *vars, gchar *keyword, gchar *value,
g_hash_table_insert(vars, keyword, value);
return;
}
else if (flags & OSDT_NO_ESCAPE)
{
g_hash_table_insert(vars, keyword, g_strdup(value));
}
else
{
g_hash_table_insert(vars, keyword, g_markup_escape_text(value, -1));
g_hash_table_insert(vars, keyword, g_strdup(value));
}

if (flags & OSDT_FREE) g_free((gpointer) value);
Expand Down

0 comments on commit f060695

Please sign in to comment.