empty optional fields: saved node contains the token name instead of an empty section I have created a content type that has some tokens within the read-only body section so that other custom fields that the user enters when they create content based on this content type are mapped to its associated token within the body section.  If the user enters information within a optional field then that entered information replaces the token when the node is saved.  The problem is for optional fields when they don't enter a anything within it then the saved node contains the token name instead of an empty section which is what we want.
I have figured it out with my own custom module:

function mymodule_tokens_alter(&amp;$replacements, $context) {
    if ($context['type'] == 'node') {
        $keys = array_keys($context['tokens']);
        foreach ($keys as $key) {
            if (isset($context['tokens'][$key]) &amp;&amp; !isset($replacements[$context['tokens'][$key]])) {
                $replacements[$context['tokens'][$key]] = '';
            }
        }
    }
}