Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
569c5def
Commit
569c5def
authored
Feb 04, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make uses of quote_slashes always operate on encoded strings
parent
f6731342
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cms/lib/xblock/runtime.py
+1
-1
common/djangoapps/xmodule_modifiers.py
+2
-2
No files found.
cms/lib/xblock/runtime.py
View file @
569c5def
...
...
@@ -16,7 +16,7 @@ def handler_url(block, handler_name, suffix='', query='', thirdparty=False):
raise
NotImplementedError
(
"edX Studio doesn't support third-party xblock handler urls"
)
url
=
reverse
(
'component_handler'
,
kwargs
=
{
'usage_id'
:
quote_slashes
(
str
(
block
.
scope_ids
.
usage_id
)),
'usage_id'
:
quote_slashes
(
unicode
(
block
.
scope_ids
.
usage_id
)
.
encode
(
'utf-8'
)),
'handler'
:
handler_name
,
'suffix'
:
suffix
,
})
.
rstrip
(
'/'
)
...
...
common/djangoapps/xmodule_modifiers.py
View file @
569c5def
...
...
@@ -71,12 +71,12 @@ def wrap_xblock(runtime_class, block, view, frag, context, display_name_only=Fal
data
[
'runtime-class'
]
=
runtime_class
data
[
'runtime-version'
]
=
frag
.
js_init_version
data
[
'block-type'
]
=
block
.
scope_ids
.
block_type
data
[
'usage-id'
]
=
quote_slashes
(
str
(
block
.
scope_ids
.
usage_id
))
data
[
'usage-id'
]
=
quote_slashes
(
unicode
(
block
.
scope_ids
.
usage_id
)
.
encode
(
'utf-8'
))
template_context
=
{
'content'
:
block
.
display_name
if
display_name_only
else
frag
.
content
,
'classes'
:
css_classes
,
'data_attributes'
:
' '
.
join
(
'data-{}="{}"'
.
format
(
key
,
value
)
for
key
,
value
in
data
.
items
()),
'data_attributes'
:
' '
.
join
(
u
'data-{}="{}"'
.
format
(
key
,
value
)
for
key
,
value
in
data
.
items
()),
}
return
wrap_fragment
(
frag
,
render_to_string
(
'xblock_wrapper.html'
,
template_context
))
...
...
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