Gracefully fail to empty string if KeyError in template sub processing

Parameters in substitution processing may be optional, but current code causes a 500 error with a KeyError if, e.g. a GET value is unset.  Fail gracefully to the empty string instead.