Commit 32f6bc07 by Daniel Friedman

Merge pull request #11887 from edx/dan-f/make-cms-404-safe

Make CMS 404 template safe by default
parents 5ec01207 c210d918
<%! from django.utils.translation import ugettext as _ %> <%page expression_filter="h"/>
<%!
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import Text, HTML
%>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">${_("Page Not Found")}</%block> <%block name="title">${_("Page Not Found")}</%block>
<%block name="bodyclass">view-util util-404</%block> <%block name="bodyclass">view-util util-404</%block>
...@@ -11,12 +15,14 @@ ...@@ -11,12 +15,14 @@
<h1 class="title title-1">${_("Page not found")}</h1> <h1 class="title title-1">${_("Page not found")}</h1>
</header> </header>
<article class="content-primary" role="main"> <article class="content-primary" role="main">
<p>${_('The page that you were looking for was not found.')} <p>
${_('Go back to the {homepage} or let us know about any pages that may have been moved at {email}.').format( ${_('The page that you were looking for was not found.')}
homepage='<a href="/">homepage</a>', ${Text(_('Go back to the {homepage} or let us know about any pages that may have been moved at {email}.')).format(
email=u'<a href="mailto:{address}">{address}</a>'.format( homepage=HTML('<a href="/">homepage</a>'),
address=settings.TECH_SUPPORT_EMAIL, email=HTML('<a href="mailto:{address}">{address}</a>'.format(
))} address=Text(settings.TECH_SUPPORT_EMAIL)
))
)}
</p> </p>
</article> </article>
</section> </section>
......
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