appmenus: allow '_' in Exec and other fields

This commit is contained in:
Marek Marczykowski-Górecki 2015-05-17 00:07:01 +02:00
parent 7e80d203ff
commit 07de8f7515

View File

@ -42,13 +42,13 @@ appmenus_line_size = 1024
appmenus_line_count = 100000
# regexps for sanitization of retrieved values
std_re = re.compile(r"^[/a-zA-Z0-9.,&() -]*$")
std_re = re.compile(r"^[/a-zA-Z0-9.,&()_ -]*$")
fields_regexp = {
"Name": std_re,
"GenericName": std_re,
"Comment": std_re,
"Categories": re.compile(r"^[a-zA-Z0-9/.;:'() -]*$"),
"Exec": re.compile(r"^[a-zA-Z0-9()%&>/{}\"'\\:.= -]*$"),
"Exec": re.compile(r"^[a-zA-Z0-9()_%&>/{}\"'\\:.= -]*$"),
"Icon": re.compile(r"^[a-zA-Z0-9/_.-]*$"),
}