Ticket #6717: 6717-url-strip.diff

File 6717-url-strip.diff, 456 bytes (added by akaihola, 7 years ago)

patch: newforms.URLField ignores leading/trailing space

  • django/newforms/fields.py

     
    505505        self.user_agent = validator_user_agent
    506506
    507507    def clean(self, value):
     508        value = value.strip()
    508509        # If no URL scheme given, assume http://
    509510        if value and '://' not in value:
    510511            value = u'http://%s' % value
Back to Top