I am trying to plug eWebEditPro+XML from Ektron into Plone as my WYSIWYG editor. I have been successful up to one tiny unacceptable glitch.
Initial content for the editor is typically stored in the value attribute of a hidden field. For example,
<input type="hidden" name="MyContent1" value="This is the initial content.">
I need to convert certain characters.  The documentation from Ektron says that if my environment does not provide such a function, I have to write it and they provide the following pseudo code as an example:
 
String strContent
strContent = ReplaceString(strContent, "&", "&amp;")
strContent = ReplaceString(strContent, "<", "&lt;")
strContent = ReplaceString(strContent, ">", "&gt;")
strContent = ReplaceString(strContent, """, "&quot;")
 
 
The following (in custom/wysiwyg_support) works as long as I don't put any apostrophes in my content:
 
<span tal:replace="structure string:<input type='hidden' name='text' value='" />
<span tal:content="inputvalue" /><span tal:replace="structure string:' />" />
 
  <span tal:replace="structure string:<script language='JavaScript'>" />
eWebEditPro.create("text", "90%", 450);
  <span tal:replace="structure string:</script>" />
 
I have tried to follow the lead that I found at:
 
http://plone.org/Members/tlynch/HowToIntegrateEditize/view
 
I have tried to replace the first two lines with:
 
<span tal:replace="structure string:<input type='hidden' name='text' value='" />
<span tal:replace="structure python:here.eweb.munge(inputvalue)" /><span tal:replace="structure string:' />" />
 
 
I have the follwing in a file at Plone/eweb
 
   ## Script (Python) "munge"
   ##bind container=container
   ##bind context=context
   ##bind namespace=
   ##bind script=script
   ##bind subpath=traverse_subpath
   ##parameters=inputvalue
   ##title=
 
   # to guard against files that might contain only
   # returns or linefeeds, we will delete each separately
   # rather than trying: replace("\r\n", "")
   inputvalue = inputvalue.replace("\r", "")
   inputvalue = inputvalue.replace("\n", "")
   inputvalue = inputvalue.replace("'", "&#039;")
 
   return inputvalue
 
When I try this, I get the following:
 
Site error
 
This site encountered an error trying to fulfill your request. The errors were: Error Details Error Type
AttributeError
 
Error Value
__call_
 
 
 
 
 

Is there anyone who might be able to steer me in the right direction or has already successfully done this?