def _serialize(self, value, key, obj):
        param_values = {}
        for name, attr_tpl in iteritems(self.params):
            attr_name = _tpl(str(attr_tpl))
            if attr_name:
                attribute_value = utils.get_value(attr_name, obj, default=missing)
                if attribute_value is not missing:
                    param_values[name] = attribute_value
                else:
                    err = AttributeError(
                        '{attr_name!r} is not a valid '
                        'attribute of {obj!r}'.format(attr_name=attr_name, obj=obj)
                    )
                    if has_forced_error:
                        raise ForcedError(err)
                    else:
                        raise err
            else:
                param_values[name] = attr_tpl
        try:
            return url_for(self.endpoint, **param_values)
        except BuildError as err:  # Make sure BuildErrors are raised
            if has_forced_error:
                raise ForcedError(err)
            else:
                raise err
Test that escaped characters don't result in errors.
dataset/ETHPy150Open marshmallow-code/flask-marshmallow/flask_marshmallow/fields.py/URLFor._serialize--crossover with--dataset/ETHPy150Open mozilla/app-validator/tests/js/test_bug_626878.py/TestDoubleEscape.test_double_escaped