Commit 69339390 by Ned Batchelder

Merge pull request #11910 from edx/ned/safe-templates-1

Safe templates for static_templates
parents 40ef82d5 e53e5d9d
<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%! from django.utils.translation import ugettext as _ %> <%!
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import Text, HTML
%>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%block name="pagetitle">${_("Page Not Found")}</%block> <%block name="pagetitle">${_("Page Not Found")}</%block>
<section class="outside-app"> <section class="outside-app">
<h1>${_("Page not found")}</h1> <h1>${_("Page not found")}</h1>
<p>${_('The page that you were looking for was not found. Go back to the {link_start}homepage{link_end} or let us know about any pages that may have been moved at {email}.').format( <p>${Text(_('The page that you were looking for was not found. Go back to the {link_start}homepage{link_end} or let us know about any pages that may have been moved at {email}.')).format(
link_start='<a href="/">', link_end='</a>', email='<a href="mailto:{email}">{email}</a>'.format(email=static.get_tech_support_email_address()) link_start=HTML('<a href="/">'),
link_end=HTML('</a>'),
email=HTML('<a href="mailto:{email}">{email}</a>').format(email=Text(static.get_tech_support_email_address()))
)}</p> )}</p>
</section> </section>
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%! 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="../main.html" /> <%inherit file="../main.html" />
<%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block> <%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block>
<section class="outside-app"> <section class="outside-app">
<p> <p>
${_("Our system indicates that you are trying to access this {platform_name} " ${Text(_("Our system indicates that you are trying to access this {platform_name} "
"course from a country or region currently subject to U.S. economic and trade " "course from a country or region currently subject to U.S. economic and trade "
"sanctions. Unfortunately, at this time {platform_name} must comply with " "sanctions. Unfortunately, at this time {platform_name} must comply with "
"export controls, and we cannot allow you to access this course." "export controls, and we cannot allow you to access this course."
).format( )).format(
platform_name=settings.PLATFORM_NAME, platform_name=Text(settings.PLATFORM_NAME),
)} )}
</p> </p>
</section> </section>
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
<%! 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="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <section class="outside-app">
<h1> <h1>
${_("Currently the {platform_name} servers are down").format( ${Text(_("Currently the {platform_name} servers are down")).format(
platform_name=u"<em>{}</em>".format(settings.PLATFORM_NAME) platform_name=HTML(u"<em>{}</em>").format(Text(settings.PLATFORM_NAME))
)} )}
</h1> </h1>
<p> <p>
${_("Our staff is currently working to get the site back up as soon as possible. " ${Text(_("Our staff is currently working to get the site back up as soon as possible. "
"Please email us at {tech_support_email} to report any problems or downtime.").format( "Please email us at {tech_support_email} to report any problems or downtime.")).format(
tech_support_email=u"<a href=\"mailto:{0}\">{0}</a>".format(settings.TECH_SUPPORT_EMAIL) tech_support_email=HTML('<a href="mailto:{0}">{0}</a>').format(Text(settings.TECH_SUPPORT_EMAIL))
)}</p> )}</p>
</section> </section>
<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%! from django.utils.translation import ugettext as _ %> <%!
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import Text, HTML
%>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <section class="outside-app">
<h1> <h1>
${_(u"There has been a 500 error on the {platform_name} servers").format( ${Text(_(u"There has been a 500 error on the {platform_name} servers")).format(
platform_name=u"<em>{platform_name}</em>".format(platform_name=static.get_platform_name()) platform_name=HTML("<em>{platform_name}</em>").format(platform_name=Text(static.get_platform_name()))
)} )}
</h1> </h1>
<p> <p>
${_(u'Please wait a few seconds and then reload the page. If the problem persists, please email us at {email}.').format( ${Text(_('Please wait a few seconds and then reload the page. If the problem persists, please email us at {email}.')).format(
email=u'<a href="mailto:{email}">{email}</a>'.format( email=HTML('<a href="mailto:{email}">{email}</a>').format(
email=static.get_tech_support_email_address() email=Text(static.get_tech_support_email_address())
) )
)} )}
</p> </p>
......
<%! 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="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <section class="outside-app">
<h1> <h1>
${_("Currently the {platform_name} servers are overloaded").format( ${Text(_("Currently the {platform_name} servers are overloaded")).format(
platform_name=u"<em>{}</em>".format(platform_name=settings.PLATFORM_NAME) platform_name=HTML("<em>{}</em>").format(platform_name=Text(settings.PLATFORM_NAME))
)} )}
</h1> </h1>
<p> <p>
${_("Our staff is currently working to get the site back up as soon as possible. " ${Text(_("Our staff is currently working to get the site back up as soon as possible. "
"Please email us at {tech_support_email} to report any problems or downtime.").format( "Please email us at {tech_support_email} to report any problems or downtime.")).format(
tech_support_email=u"<a href=\"mailto:{0}\">{0}</a>".format(tech_support_email=settings.TECH_SUPPORT_EMAIL) tech_support_email=HTML('<a href="mailto:{0}">{0}</a>').format(tech_support_email=Text(settings.TECH_SUPPORT_EMAIL))
)} )}
</p> </p>
</section> </section>
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
......
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