jaehwan pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=89e5d7e468f387188a6a74eda8134499e78e2779
commit 89e5d7e468f387188a6a74eda8134499e78e2779 Author: Jaehwan Kim <jae.hwan....@samsung.com> Date: Thu Sep 29 11:05:11 2016 +0900 validate: fix NAME_REGEX about the file name. --- src/bin/common/string_common.h | 1 + src/bin/ui/tab_home_import_edc.c | 2 +- src/bin/ui/tab_home_import_edj.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/common/string_common.h b/src/bin/common/string_common.h index 3a4d62e..1cf6751 100644 --- a/src/bin/common/string_common.h +++ b/src/bin/common/string_common.h @@ -33,6 +33,7 @@ #define LAYOUT_NAME_REGEX "^[a-zA-Z0-9_\\.\\/-]+$" #define NAME_REGEX "^[a-zA-Z0-9_]+$" +#define FILE_NAME_REGEX "^[a-zA-Z0-9_\\.-]+$" #define STATE_VALUE_REGEX "^((0?(\\.[0-9]+)?|1(\\.0+)?))?$" #define PART_NAME_REGEX "^[a-zA-Z0-9_\\.]+$" #define DATA_NAME_REGEX ".*" diff --git a/src/bin/ui/tab_home_import_edc.c b/src/bin/ui/tab_home_import_edc.c index 2c69db6..9817e9a 100644 --- a/src/bin/ui/tab_home_import_edc.c +++ b/src/bin/ui/tab_home_import_edc.c @@ -479,7 +479,7 @@ _tab_import_edc_add(void) Evas_Object *sc, *item, *separ; Dir_Data *dir_data; - tab_edc.name_validator = elm_validator_regexp_new(NAME_REGEX, NULL); + tab_edc.name_validator = elm_validator_regexp_new(FILE_NAME_REGEX, NULL); tab_edc.layout = elm_layout_add(ap.win); elm_layout_theme_set(tab_edc.layout, "layout", "tab_home", "import_edc"); diff --git a/src/bin/ui/tab_home_import_edj.c b/src/bin/ui/tab_home_import_edj.c index 354dcc8..8e80934 100644 --- a/src/bin/ui/tab_home_import_edj.c +++ b/src/bin/ui/tab_home_import_edj.c @@ -553,7 +553,7 @@ _tab_import_edj_del(void *data __UNUSED__, Evas_Object * _tab_import_edj_add(void) { - tab_edj.name_validator = elm_validator_regexp_new(NAME_REGEX, NULL); + tab_edj.name_validator = elm_validator_regexp_new(FILE_NAME_REGEX, NULL); tab_edj.layout = elm_layout_add(ap.win); elm_layout_theme_set(tab_edj.layout, "layout", "tab_home", "import_edj"); --