From 94c5b3fd8f3d9a9ee27ad7914eb5c4068585c87e Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Thu, 24 Jul 2025 12:09:22 -0600 Subject: [PATCH] update-tags-encoding: escape '/' and ',' in tags --- tools/update-tags-encoding | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/update-tags-encoding b/tools/update-tags-encoding index b276b83..03b866e 100755 --- a/tools/update-tags-encoding +++ b/tools/update-tags-encoding @@ -12,6 +12,13 @@ set -e #set -x +function escape_tag() { + TAG="$1" + TAG=$(echo "${TAG}" | sed -re 's/,/,0/g') + TAG=$(echo "${TAG}" | sed -re 's/\//,1/g') + echo "${TAG}" +} + BRANCH="" if [[ -n "$1" ]] && [[ -d "$1" ]]; then @@ -58,6 +65,7 @@ for ISSUE_ID in $(find . -maxdepth 1 -type d -regextype posix-extended -regex '\ mkdir tags for TAG in ${TAGS}; do + TAG=$(escape_tag "${TAG}") touch "tags/${TAG}" done