The code is intended to escape the string, which would require replacing "'" with "\\'".
But after fixing that, backslashes in the CSV still wouldn't be handled property. It might be better to use json.dumps() here and remove the single-quotes on line 28.
:wave: Hi, apologies for the drive-by bug report, but today I did a search for
.replace("'", "\'")
and this line of code in Penelope came up.This is a bug:
"'"
and"\'"
are the same string.The code is intended to escape the string, which would require replacing
"'"
with"\\'"
.But after fixing that, backslashes in the CSV still wouldn't be handled property. It might be better to use
json.dumps()
here and remove the single-quotes on line 28.