summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/api.py b/bitbake/lib/toaster/toastergui/api.py
index 42901f750a..961b594ef4 100644
--- a/bitbake/lib/toaster/toastergui/api.py
+++ b/bitbake/lib/toaster/toastergui/api.py
@@ -18,6 +18,7 @@
18 18
19 19
20# Temporary home for the UI's misc API 20# Temporary home for the UI's misc API
21import re
21 22
22from orm.models import Project, ProjectTarget, Build 23from orm.models import Project, ProjectTarget, Build
23from bldcontrol.models import BuildRequest 24from bldcontrol.models import BuildRequest
@@ -92,7 +93,7 @@ class XhrBuildRequest(View):
92 if 'targets' in request.POST: 93 if 'targets' in request.POST:
93 ProjectTarget.objects.filter(project = project).delete() 94 ProjectTarget.objects.filter(project = project).delete()
94 s = str(request.POST['targets']) 95 s = str(request.POST['targets'])
95 for t in s.translate(None, ";%|\"").split(" "): 96 for t in re.sub(r'[;%|"]', '', s).split(" "):
96 if ":" in t: 97 if ":" in t:
97 target, task = t.split(":") 98 target, task = t.split(":")
98 else: 99 else: