Safe Templates

This commit is contained in:
attiyaishaque
2016-04-06 16:04:13 +05:00
parent 2291e2139f
commit 002ad84d4d
2 changed files with 12 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
<%page expression_filter="h"/>
<%inherit file="base.html" />
<%!
from django.utils.translation import ugettext as _
@@ -22,17 +23,17 @@ help_link_end = '</a>'
<article class="error-prompt">
% if error == '404':
<h1>${_("The Page You Requested Page Cannot be Found")}</h1>
<p class="description">${_("We're sorry. We couldn't find the {studio_name} page you're looking for. You may want to return to the {studio_name} Dashboard and try again. If you are still having problems accessing things, please feel free to {link_start}contact {studio_name} support{link_end} for further help.").format(
<p class="description">${Text(_("We're sorry. We couldn't find the {studio_name} page you're looking for. You may want to return to the {studio_name} Dashboard and try again. If you are still having problems accessing things, please feel free to {link_start}contact {studio_name} support{link_end} for further help.")).format(
studio_name=settings.STUDIO_SHORT_NAME,
link_start=help_link_start,
link_end=help_link_end,
link_start=HTML(help_link_start),
link_end=HTML(help_link_end),
)}</p>
% elif error == '500':
<h1>${_("The Server Encountered an Error")}</h1>
<p class="description">${_("We're sorry. There was a problem with the server while trying to process your last request. You may want to return to the {studio_name} Dashboard or try this request again. If you are still having problems accessing things, please feel free to {link_start}contact {studio_name} support{link_end} for further help.").format(
<p class="description">${Text(_("We're sorry. There was a problem with the server while trying to process your last request. You may want to return to the {studio_name} Dashboard or try this request again. If you are still having problems accessing things, please feel free to {link_start}contact {studio_name} support{link_end} for further help.")).format(
studio_name=settings.STUDIO_SHORT_NAME,
link_start=help_link_start,
link_end=help_link_end,
link_start=HTML(help_link_start),
link_end=HTML(help_link_end),
)}</p>
% endif
<a href="/" class="back-button">${_("Back to dashboard")}</a>