Files
edx-platform/lms/templates/wiki/preview_inline.html
Adeel Khan 298d3554fe Fix templates for XSS code injection via translations
This would patch all templates (django/mako)
for a possible XSS code injection via
translation files by html escaping them..

LEARNER-4632
2019-06-25 14:22:42 +05:00

54 lines
1.5 KiB
HTML

<!DOCTYPE html>
{% load wiki_tags i18n %}{% load theme_pipeline %}
<html lang="{{LANGUAGE_CODE}}">
<head>
{% stylesheet 'course' %}
{% javascript 'main_vendor' %}
</head>
<body class="modal-preview">
<section class="container wiki view">
<div class="main-article">
{% if revision %}
<div class="alert alert-info">
<strong>{% trans "Previewing revision:" as tmsg%}{{tmsg|force_escape}}</strong>
{% include "wiki/includes/revision_info.html" %}
</div>
{% endif %}
{% if merge %}
<div class="alert alert-info">
<strong>{% trans "Previewing a merge between two revisions:" as tmsg%}{{tmsg|force_escape}}</strong>
<ol>
<li>{% include "wiki/includes/revision_info.html" with revision=merge1 %}</li>
<li>{% include "wiki/includes/revision_info.html" with revision=merge2 %}</li>
</ol>
</div>
{% endif %}
<h1 class="page-header">{{ title }}</h1>
{% if revision and revision.deleted %}
<div class="warning">
<strong>{% trans "This revision has been deleted." as tmsg %}{{tmsg|force_escape}}</strong>
<p>{% trans "Restoring to this revision will mark the article as deleted." as tmsg %}{{tmsg|force_escape}}</p>
</div>
{% else %}
{% wiki_render article content %}
{% endif %}
</div>
</section>
{% javascript 'application' %}
{% javascript 'module-js' %}
{% with mathjax_mode='wiki' %}
{% include "mathjax_include.html" %}
{% endwith %}
</body>
</html>