Replace variables in templates literally
This commit is contained in:
parent
2991939575
commit
b5a534b363
1 changed files with 1 additions and 1 deletions
|
@ -1057,7 +1057,7 @@ sokoke_replace_variables (const gchar* template,
|
||||||
const gchar* value = va_arg (args, const gchar*);
|
const gchar* value = va_arg (args, const gchar*);
|
||||||
GRegex* regex = g_regex_new (variable, 0, 0, NULL);
|
GRegex* regex = g_regex_new (variable, 0, 0, NULL);
|
||||||
gchar* replaced = result;
|
gchar* replaced = result;
|
||||||
result = g_regex_replace (regex, replaced, -1, 0, value, 0, NULL);
|
result = g_regex_replace_literal (regex, replaced, -1, 0, value, 0, NULL);
|
||||||
g_free (replaced);
|
g_free (replaced);
|
||||||
g_regex_unref (regex);
|
g_regex_unref (regex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue