You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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')
The text was updated successfully, but these errors were encountered:
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
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
The text was updated successfully, but these errors were encountered: