Ok, thanks for the info Wayne The problem is not with python, it is that when you click on the test tab at the top of the python script editing page (within the ZMI) the data is being displayed in your web browser - which interprets html commands. If you want to see the html tags (for debugging purposes) when you click on the 'test' tab try something like: return '<textarea>'+mystring+'</textarea> This will do two things: (1) prove that it is your browser interpreting the html tags in the string (because your browser will create a textarea field) and (2) allow you to see the actual contents of 'mystring' If you dont want to display the data when you get back to dtml, use the dtml-call tag or the dtml-let tag to store the data in a local variable for future use (instead of calling the python script with dtml-var). HTH Jonathan