mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-16 08:26:48 +01:00
Replace all escaped slashes in json strings (closes #866)
${var/pattern/string} will only replace the first occurence. We should
use ${var//pattern/string} to replace all escaped slashes.
This commit is contained in:
committed by
Lukas Schauer
parent
fa68ad8b23
commit
67b111a7b0
@@ -217,7 +217,7 @@ jsonsh() {
|
||||
'[') parse_array "$jpath" ;;
|
||||
# At this point, the only valid single-character tokens are digits.
|
||||
''|[!0-9]) throw "EXPECTED value GOT ${token:-EOF}" ;;
|
||||
*) value="${token/\\\///}"
|
||||
*) value="${token//\\\///}"
|
||||
# replace solidus ("\/") in json strings with normalized value: "/"
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user