I noticed that some of the jokes result in invalid JSON as they contain double quotes.
Example
{
"text": "Powered by: Drazzilb | A photon checks into a hotel. Receptionist: "May I take your bags sir?" Photon: "I don't have any bags, I'm travelling light.""
}
The double quotes should either be made single quotes or escaped
{
"text": "Powered by: Drazzilb | A photon checks into a hotel. Receptionist: \"May I take your bags sir?\" Photon: \"I don't have any bags, I'm travelling light.\""
}
I've modified the joke line to be
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
Hi,
I noticed that some of the jokes result in invalid JSON as they contain double quotes.
Example
The double quotes should either be made single quotes or escaped
I've modified the joke line to be