diff options
author | Belen Barros Pena <belen.barros.pena@linux.intel.com> | 2016-09-05 15:29:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-08 00:33:47 +0100 |
commit | 8ba4f540373bb486c80c290877856350a7f6d339 (patch) | |
tree | 0b5938d72bf9891b519dc8d0da31fbc15264db94 /bitbake/lib/toaster/toastergui/templates | |
parent | b5070f5337cd0914b16ff619f8fcd0bfd189f464 (diff) | |
download | poky-8ba4f540373bb486c80c290877856350a7f6d339.tar.gz |
bitbake: toaster: Allow forward slash in variable names
Add forward slash to the list of special characters allowed in variable
names. Also update the list of allowed special characters in the error
messages.
[YOCTO #9611]
(Bitbake rev: 146f6f95a8753308edb31e952d7c440c8de11870)
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projectconf.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html index c3ed216194..fcf6df2bf8 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectconf.html +++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html | |||
@@ -251,16 +251,16 @@ function validate_new_variable() { | |||
251 | } | 251 | } |
252 | } | 252 | } |
253 | 253 | ||
254 | var bad_chars = /[^a-zA-Z0-9\-_]/.test(variable); | 254 | var bad_chars = /[^a-zA-Z0-9\-_/]/.test(variable); |
255 | var has_spaces = (0 <= variable.indexOf(" ")); | 255 | var has_spaces = (0 <= variable.indexOf(" ")); |
256 | var only_spaces = (0 < variable.length) && (0 == variable.trim().length); | 256 | var only_spaces = (0 < variable.length) && (0 == variable.trim().length); |
257 | 257 | ||
258 | if (only_spaces) { | 258 | if (only_spaces) { |
259 | error_msg = "A valid variable name cannot include spaces"; | 259 | error_msg = "A valid variable name cannot include spaces"; |
260 | } else if (bad_chars && has_spaces) { | 260 | } else if (bad_chars && has_spaces) { |
261 | error_msg = "A valid variable name can only include letters, numbers, underscores, dashes, and cannot include spaces"; | 261 | error_msg = "A valid variable name can only include letters, numbers and the special characters <code> _ - /</code>. Variable names cannot include spaces"; |
262 | } else if (bad_chars) { | 262 | } else if (bad_chars) { |
263 | error_msg = "A valid variable name can only include letters, numbers, underscores, and dashes"; | 263 | error_msg = "A valid variable name can only include letters, numbers and the special characters <code>_ - /</code>"; |
264 | } | 264 | } |
265 | 265 | ||
266 | if ("" != error_msg) { | 266 | if ("" != error_msg) { |