diff --git a/webform.module b/webform.module index 612adb0..ac6b654 100644 --- a/webform.module +++ b/webform.module @@ -2587,6 +2587,14 @@ function _webform_fetch_draft_sid($nid, $uid) { function _webform_filter_values($string, $node = NULL, $submission = NULL, $email = NULL, $strict = TRUE, $allow_anonymous = FALSE) { global $user; static $replacements; + + // Use the current node as a fallback if it wasn't passed in. + if ($node == NULL) { + $q = $_GET['q']; + $q = explode('/',$q); + $qid = (int)$q[1]; + $node = node_load($qid); + } // Don't do any filtering if the string is empty. if (strlen(trim($string)) == 0) {