Commit 6d2464a3 by Ben McMorran

fixup! Enable HTML in note tags and support highlighting

parent 6ed752e5
...@@ -139,13 +139,14 @@ def preprocess_collection(user, course, collection): ...@@ -139,13 +139,14 @@ def preprocess_collection(user, course, collection):
cache = {} cache = {}
with store.bulk_operations(course.id): with store.bulk_operations(course.id):
for model in collection: for model in collection:
model.update({ update = {
u"text": sanitize_html(model["text"]), u"text": sanitize_html(model["text"]),
u"quote": sanitize_html(model["quote"]), u"quote": sanitize_html(model["quote"]),
u"updated": dateutil_parse(model["updated"]), u"updated": dateutil_parse(model["updated"]),
}) }
if "tags" in model: 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"] usage_id = model["usage_id"]
if usage_id in cache: if usage_id in cache:
model.update(cache[usage_id]) model.update(cache[usage_id])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment