projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17f4e41
)
sanitize json_get_type function
author
Luka Perkov
<luka@openwrt.org>
Fri, 4 Jan 2013 10:26:08 +0000
(11:26 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 4 Jan 2013 12:28:08 +0000
(13:28 +0100)
Signed-off-by: Luka Perkov <luka@openwrt.org>
sh/jshn.sh
patch
|
blob
|
history
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index 70c3aa36b3f026d3f62634316927409c98b87d26..1c357110b3eac7e1001ddae18fc963f04bda2c47 100644
(file)
--- a/
sh/jshn.sh
+++ b/
sh/jshn.sh
@@
-197,7
+197,7
@@
json_get_type() {
local cur
_json_get_var cur JSON_CUR
- local var="${JSON_PREFIX}TYPE_${cur}_$
2
"
+ local var="${JSON_PREFIX}TYPE_${cur}_$
{2//[^a-zA-Z0-9_]/_}
"
eval "export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]"
}