diff --git a/plugin/hooks/grimoire_shape_check.sh b/plugin/hooks/grimoire_shape_check.sh index 3fa9709e..a1567693 100644 --- a/plugin/hooks/grimoire_shape_check.sh +++ b/plugin/hooks/grimoire_shape_check.sh @@ -91,7 +91,8 @@ _unique() { awk '!seen[$0]++' "$1" 2>/dev/null | head -n 80; } # The note a prompt carried: were its lines judged since? if [ -s "$asked_file" ]; then - asked_enc=$(_unique "$asked_file" | grimoire_urlenc) || asked_enc="" + asked=$(_unique "$asked_file") + asked_enc=$(printf '%s' "$asked" | grimoire_urlenc) || asked_enc="" if [ -n "$asked_enc" ] && curl -fsS --max-time 4 \ -H "Authorization: Bearer ${token}" \ "${url%/}/api/plugin/shape-check?phase=after&written=${asked_enc}${scope_q}" \