Closed Mast3rwaf1z closed 4 months ago
What about products with " in the name
Hmm good point, i'll just have a google to see how others solve that as well, no way we have to consider everything :P
I have tested it using mailhog like in #434, mailhog --smtp-bind-addr 0.0.0.0:25
and this python script:
import csv
with open("Downloads/sales.csv") as file:
reader = csv.reader(file)
for row in reader:
print(row)
the two issues i've mentioned is gone now at least
What about products with " in the name
@krestenlaust this should be covered now
I have an alternative idea that i just tested, instead of having the rows_to_csv function we have now, we can go with your idea of using the csv library and mock a file class:
import csv
class fakefile:
data = ""
def write(self, data):
self.data += data
def rows_to_csv(rows):
file = fakefile()
writer = csv.writer(file)
writer.writerows(rows)
return file.data
in progress fix to unsanitized values in csv files, there are two issues atm