Escape any 's in the key name.
This commit is contained in:
parent
0b704e6ef1
commit
05fc13bc1d
1 changed files with 3 additions and 0 deletions
|
|
@ -469,6 +469,9 @@ parse_ini() {
|
|||
# Squash multiple consecutive blanks into a single space.
|
||||
((SQUASH_SPACES == 1)) && KEY="${KEY//+([[:blank:]])/ }"
|
||||
|
||||
# Escape any 's in the key name.
|
||||
KEY="${KEY//\'/\'\\\'\'}"
|
||||
|
||||
# If the value starts with a " or ' it must end with same.
|
||||
if [[ "${VALUE:0:1}" =~ [\"\'] ]]; then
|
||||
if [[ "${VALUE:0:1}" == "${VALUE: -1:1}" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue