What's the most effective way to clean text pasted from Microsoft Word?

A common problem in forms arise when content is pasted from Microsoft Word. Characters sometimes become corrupted and do not store themselves well in the backend. One way to correct it is with a simple UDF (user-defined function) called deMoronize. This UDF will clean up the broken content and replace it with safer characters.

<!--- udf.cfm contains deMoronize, downloaded from cflib.org --->
<cfinclude template="udf.cfm">
<cfset cleanText = deMoronize(form.text)>

This question was written by Raymond Camden
It was last updated on March 21, 2006.




comments powered by Disqus