// JavaScript Document
<script type="text/javascript">
function fixit() {
  var numberOfElements = document.theForm.elements.length;
  for (x=0; x<numberOfElements; x++)  {
  // replace all the single, double quotes:
    var curElement = window.document.theForm.elements[x];
    curElement.value = curElement.value.replace(/\'/g, "&#39;");
    curElement.value = curElement.value.replace(/\"/g, "&#34;");
  }
  return true;
}
</script>