title: Run replace script in Google App Maker
body: <p>I would like to add a server script that replaces special characters when a textbox is filled. The info for the "onValueEdit" routine states:
  <em>This script will run on the client whenever the value of this widget is edited by the user. The widget can be referenced using parameter widget and the new value of the widget is stored in newValue. Unlike onValueChange(), this runs only when a user changes the value of the widget; it won't run in response to bindings or when the value is set programmatically.</em></p>
  
  <p>Therefore I have built the following server script that should take the text from the textbox, overwrite the special characters and replace the text in the textbox. But when I add the script to "onValueEdit" event, Google App Maker returns "function is undefined".</p>
  
  <pre class="lang-javascript prettyprint-override"><code>function cleanup(input, output) {
    if (input !== null) {
      output = input.trim();
      output = output.replace('ß','ss');
      output = output.replace('ä','ae');
      output = output.replace('ö','oe');
      output = output.replace('ü','ue');
      return output;
    }
  }
  </code></pre>