Eric Fernandez wrote at 2006-8-9 11:20 +0100:
I have a problem when I upload an ASCII text file into a zope2 folder. I have a plain-text file with double quotes and line breaks. However, once uploaded, double quotes become " and line breaks become \n. Even if I change the property into text/plain or text/xml, I get the same problem.
The default object type generated for "text/html", "text/xml" or "text/plain" is a "DTMLDocument" (and not a "File" object as you might except). The "__str__" method of "DTMLDocument" performs HTML escaping. That's why '"' may appear as """. You can install your own "PUT_factory" (search the mailing list archives for details) to control the type of object created during various types of uploads. -- Dieter