fix compatibility with weird clients that don't encode ; as %3B

This commit is contained in:
konomo 2021-11-07 19:59:46 +00:00
parent 413cdb01d5
commit fd07a0c94f
2 changed files with 5 additions and 1 deletions

View File

@ -15,4 +15,5 @@ copy it into your gemini directory and make it executable of course
* 2021-11-06: made each sentence a list item for easier reading
* 2021-11-06: make the pronoun text a little easier to see, and remove the unnecessary '---' in that case. also change the input text to direct the user how to enter stuff.
* 2021-11-06: by exporting the sentences to a file, more can be added easily.
* 2021-11-07: the position of the pronouns is now independent
* 2021-11-07: the position of the pronouns within the array is now independent
* 2021-11-07: fix compatibility with weird clients that don't encode ; as %3B

View File

@ -10,6 +10,9 @@ setnumber=999
if [[ "${name}" == *"%3B"* ]]; then
pronouns="${name#*%3B}"
name=$(echo -n "${name}" | sed 's/%3B.*//')
elif [[ "${name}" == *";"* ]]; then # This shouldn't happen, but I have seen it with Xenia on Android
pronouns="${name#*;}"
name=$(echo -n "${name}" | sed 's/;.*//')
fi
printf "20 text/gemini\r\n"