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
6d2464a3
Commit
6d2464a3
authored
May 29, 2015
by
Ben McMorran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Enable HTML in note tags and support highlighting
parent
6ed752e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lms/djangoapps/edxnotes/helpers.py
+4
-3
No files found.
lms/djangoapps/edxnotes/helpers.py
View file @
6d2464a3
...
...
@@ -139,13 +139,14 @@ def preprocess_collection(user, course, collection):
cache
=
{}
with
store
.
bulk_operations
(
course
.
id
):
for
model
in
collection
:
model
.
update
(
{
update
=
{
u"text"
:
sanitize_html
(
model
[
"text"
]),
u"quote"
:
sanitize_html
(
model
[
"quote"
]),
u"updated"
:
dateutil_parse
(
model
[
"updated"
]),
}
)
}
if
"tags"
in
model
:
model
.
update
({
u"tags"
:
[
sanitize_html
(
tag
)
for
tag
in
model
[
"tags"
]]})
update
[
u"tags"
]
=
[
sanitize_html
(
tag
)
for
tag
in
model
[
"tags"
]]
model
.
update
(
update
)
usage_id
=
model
[
"usage_id"
]
if
usage_id
in
cache
:
model
.
update
(
cache
[
usage_id
])
...
...
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