Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-drag-and-drop-v2
Commits
fa4fea05
Unverified
Commit
fa4fea05
authored
Jan 18, 2018
by
Camilo Aguilar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensures URLs are utf-8 encoded. Fixes #150
parent
8d33c511
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
drag_and_drop_v2/drag_and_drop_v2.py
+2
-2
No files found.
drag_and_drop_v2/drag_and_drop_v2.py
View file @
fa4fea05
...
@@ -831,13 +831,13 @@ class DragAndDropBlock(
...
@@ -831,13 +831,13 @@ class DragAndDropBlock(
for this.
for this.
"""
"""
if
hasattr
(
self
.
runtime
,
'replace_urls'
):
if
hasattr
(
self
.
runtime
,
'replace_urls'
):
url
=
self
.
runtime
.
replace_urls
(
'"{}"'
.
format
(
url
))[
1
:
-
1
]
url
=
self
.
runtime
.
replace_urls
(
u
'"{}"'
.
format
(
url
))[
1
:
-
1
]
elif
hasattr
(
self
.
runtime
,
'course_id'
):
elif
hasattr
(
self
.
runtime
,
'course_id'
):
# edX Studio uses a different runtime for 'studio_view' than 'student_view',
# edX Studio uses a different runtime for 'studio_view' than 'student_view',
# and the 'studio_view' runtime doesn't provide the replace_urls API.
# and the 'studio_view' runtime doesn't provide the replace_urls API.
try
:
try
:
from
static_replace
import
replace_static_urls
# pylint: disable=import-error
from
static_replace
import
replace_static_urls
# pylint: disable=import-error
url
=
replace_static_urls
(
'"{}"'
.
format
(
url
),
None
,
course_id
=
self
.
runtime
.
course_id
)[
1
:
-
1
]
url
=
replace_static_urls
(
u
'"{}"'
.
format
(
url
),
None
,
course_id
=
self
.
runtime
.
course_id
)[
1
:
-
1
]
except
ImportError
:
except
ImportError
:
pass
pass
return
url
return
url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment