diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 4a21b19a50..72f7aa32a4 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -2,10 +2,9 @@ import logging from uuid import uuid4 -from requests.packages.urllib3.util import parse_url from static_replace import replace_static_urls -from django.core.exceptions import PermissionDenied, ValidationError +from django.core.exceptions import PermissionDenied from django.contrib.auth.decorators import login_required from xmodule.modulestore import Location @@ -147,15 +146,6 @@ def save_item(request): field.write_to(existing_item, value) - if existing_item.category == 'video': - - allowedSchemes = ['https'] - # The entire site is served from https, so browsers with good - # security will reject non-https URLs anyway. - # Also, following video module specific code is here, because front-end - # metadata fields doesn't support validation. - if metadata_key == 'html5_sources' and not all([parse_url(u).scheme.lower() in allowedSchemes for u in value]): - raise ValidationError(u'HTML5 video sources support following protocols: {0}.'.format(' '.join(allowedSchemes))) # Save the data that we've just changed to the underlying # MongoKeyValueStore before we update the mongo datastore. existing_item.save()