Merge branch 'release'

Conflicts:
	cms/djangoapps/contentstore/views/item.py
This commit is contained in:
jsa
2013-11-14 09:24:52 -05:00

View File

@@ -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()