'Resolves a variable out of context if it\'s not in quotes'

def resolve(self, var, context):

    if (var is None):
        return var
    if ((var[0] in ('"', "'")) and (var[(-1)] == var[0])):
        return var[1:(-1)]
    else:
        return template.Variable(var).resolve(context)
