Commit 2c9d2095 authored by Richard Mansfield's avatar Richard Mansfield

Turn autoescape on by default & turn it off in every template

We will remove it in each template once we've added |escape or |safe to every variable.
Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 9203cad6
{auto_escape off}
{if !$options.hidetitle}<h2>{$artefacttitle}</h2>{/if}
{$description}
......@@ -13,3 +14,4 @@
{if $newerpostslink}<div><a href="{$newerpostslink|escape}">{str tag=newerposts section=artefact.blog}</a></div>{/if}
</div>
{/if}
{/auto_escape}
{auto_escape off}
<ul>
{foreach from=$mostrecent item=post}
<li>
......@@ -9,3 +10,4 @@
</li>
{/foreach}
</ul>
{/auto_escape}
{auto_escape off}
{include file="export:html:header.tpl"}
{$rendered_blog}
{include file="export:html:footer.tpl"}
{/auto_escape}
{auto_escape off}
<p>{$stryouhaveblogs}</p>
{if $blogs}
<ul>
......@@ -6,3 +7,4 @@
{/foreach}
</ul>
{/if}
{/auto_escape}
{auto_escape off}
<tr>
<td style="width: 20px;" rowspan="2">
{$formcontrols}
......@@ -7,3 +8,4 @@
<tr>
<td>{if $artefact->description}{$artefact->description}{/if}</td>
</tr>
{/auto_escape}
{auto_escape off}
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{$feed.title}</title>
......@@ -35,3 +36,4 @@
</entry>
{/foreach}
</feed>
{/auto_escape}
{auto_escape off}
<script type="text/javascript">
function confirmdelete(id) {
if(confirm("{str tag=deleteblog? section=artefact.blog}")) {
......@@ -18,3 +19,4 @@
</td>
</tr>
{/foreach}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{$form}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{str tag=insertimage section=artefact.blog}</title>
......@@ -77,3 +78,4 @@
</form>
</body>
</html>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<div class="rbuttons">
<a class="btn btn-add" href="{$WWWROOT}artefact/blog/new/">{str section="artefact.blog" tag="addblog"}</a>
......@@ -18,3 +19,4 @@
{/if}
</div>
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{$newblogform}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
<table>
<tbody>
{foreach from=$PROPERTIES item=item}
......@@ -8,3 +9,4 @@
{/foreach}
</tbody>
</table>
{/auto_escape}
{auto_escape off}
{**
* This template displays a blog post.
*}
......@@ -21,3 +22,4 @@
{/if}
<div class="postdetails">{$postedbyon|escape}</div>
</div>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{$editform}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<div id="myblogs rel">
......@@ -21,3 +22,4 @@
</div>
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{foreach from=$data item=item}
<tr class="{cycle name=rows values='r0,r1'}{if $item->highlight} highlight{/if}">
<td>
......@@ -37,3 +38,4 @@
</td>
</tr>
{/foreach}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<p>{$strdescription}</p>
{$form}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="export:html:header.tpl"}
<h2>{str tag=Folder section=artefact.file}: {$folder|escape}</h2>
......@@ -49,3 +50,4 @@
{/if}
{include file="export:html:footer.tpl"}
{/auto_escape}
{auto_escape off}
<p><a href="{$rootpath}files/file/index.html">Browse your file collection</a></p>
<ul>
<li>{str tag=Files section=artefact.file}: {$filecount|escape}</li>
<li>{str tag=Folders section=artefact.file}: {$foldercount|escape}</li>
<li>{str tag=spaceused section=artefact.file}: {$spaceused|display_size|escape}</li>
</ul>
{/auto_escape}
{auto_escape off}
<tr title="{$artefact->hovertitle|escape}">
<td style="width: 20px;">
{$formcontrols}
......@@ -5,3 +6,4 @@
<td style="width: 22px;"><label for="{$elementname}_{$artefact->id}"><img src="{$artefact->icon|escape}" alt="*"></label></td>
<th><label for="{$elementname}_{$artefact->id}">{if $artefact->description}{$artefact->description|escape}{else}{$artefact->title|escape}{/if}{if $artefact->artefacttype == 'profileicon'} ({str tag=profileicon section=artefact.file}){/if}</label></th>
</tr>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<div id="extract">
<h3>{str tag=pleasewaitwhileyourfilesarebeingunzipped section=artefact.file}</h3>
<iframe src="{$WWWROOT}artefact/file/extract-progress.php" id="progress" scrolling="no" frameborder="none"></iframe>
</div>
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{if $file}
......@@ -22,3 +23,4 @@
{/if}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
<div>
<div class="fl filedata-icon"><a href="{$downloadpath|escape}"><img src="{$iconpath|escape}" alt="{$description|escape}"></a></div>
<h4><a href="{$downloadpath|escape}">{$title|escape}</a></h4>
......@@ -13,3 +14,4 @@
<tr><th>{str tag=Size section=artefact.file}:</th><td>{$size|escape}</td></tr>
<tr><th>{str tag=Download section=artefact.file}:</th><td><a href="{$downloadpath|escape}">{str tag=Download section=artefact.file}</a></td></tr>
</table>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{if $institution}
{$institutionselector}
......@@ -10,3 +11,4 @@
{/if}
<div>{$form}</div>
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
<div>
{if !$simpledisplay}<h3>{$title|escape}</h3>{/if}
<div>{$description|escape}</div>
......@@ -33,3 +34,4 @@
{/if}
</div>
</div>
{/auto_escape}
{auto_escape off}
<tr id="{$prefix}_edit_row"{if !$fileinfo} class="hidden"{/if}>
<td colspan=6>
<table>
......@@ -62,3 +63,4 @@
</table>
</td>
</tr>
{/auto_escape}
{auto_escape off}
{if $config.select}
{include file="artefact:file:form/selectedlist.tpl" selectedlist=$selectedlist prefix=$prefix highlight=$highlight}
{/if}
......@@ -108,4 +109,4 @@
</div>
{/if}
</div>
\ No newline at end of file
</div>{/auto_escape}
{auto_escape off}
{if !$filelist}
<p>{str tag=nofilesfound section=artefact.file}</p>
{else}
......@@ -76,3 +77,4 @@
</tbody>
</table>
{/if}
{/auto_escape}
{auto_escape off}
{foreach from=$path item=f name=path}
{if !$.foreach.path.first}/ {/if}<a href="{$querybase}folder={$f->id}{if $owner}&owner={$owner}{if $ownerid}&ownerid={$ownerid}{/if}{/if}" class="changefolder">{$f->title|str_shorten_text:34|escape}</a>
{/foreach}
{/auto_escape}
{auto_escape off}
{if $tabs.subtabs}
<ul class="artefactchooser-subtabs">
{foreach from=$tabs.subtabs item=displayname key=ownerid}
......@@ -5,3 +6,4 @@
{/foreach}
</ul>
{/if}
{/auto_escape}
{auto_escape off}
<ul class="artefactchooser-tabs files">
{foreach from=$tabs.tabs item=displayname key=name}
<li{if $tabs.owner == $name} class="current"{/if}><a class="changeowner" href="{$querybase}owner={$name}">{$displayname}</a></li>
{/foreach}
</ul>
{/auto_escape}
{auto_escape off}
<p id="{$prefix}_empty_selectlist"{if !$selectedlist} class="hidden"{/if}>{str tag=nofilesfound section=artefact.file}</p>
<table id="{$prefix}_selectlist" class="attachments fullwidth{if !$selectedlist} hidden{/if}">
<thead>
......@@ -28,3 +29,4 @@
</tbody>
</table>
{/auto_escape}
{auto_escape off}
<div>
<a href="{$downloadpath|escape}"><img src="{$downloadpath|escape}&maxwidth=1000&maxheight=750" alt="{$title|escape}"></a>
<p>{$description|escape}</p>
<div><a href="{$metadataurl|escape}">{str tag=Details section=artefact.file}</a></div>
</div>
{/auto_escape}
{auto_escape off}
<div class="fr filedata-icon" style="text-align: center;">
<h4>{str tag=Preview section=artefact.file}</h4>
<img src="{$previewpath|escape}" alt="">
......@@ -16,3 +17,4 @@
<tr><th>{str tag=Size section=artefact.file}:</th><td>{$size|escape}</td></tr>
<tr><th>{str tag=Download section=artefact.file}:</th><td><a href="{$downloadpath|escape}">{str tag=Download section=artefact.file}</a></td></tr>
</table>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{$settingsformtag}
<table id="profileicons" class="hidden tablerenderer">
......@@ -25,3 +26,4 @@
{$uploadform}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
<ul>
{foreach from=$profileinfo key=key item=item}
<li><strong>{str tag=$key section=artefact.internal}:</strong> {$item}</li>
{/foreach}
</ul>
{/auto_escape}
{auto_escape off}
{if $profileiconpath}<div class="fr"><img src="{$profileiconpath|escape}" alt=""></div>{/if}
<p>{$profileinfo.introduction|clean_html}</p>
{if $profileinfo && (count($profileinfo) != 1 || !$profileinfo.introduction)}<ul>
......@@ -7,3 +8,4 @@
{/foreach}
</ul>{/if}
{if $profileiconpath}<div class="cb"></div>{/if}
{/auto_escape}
{auto_escape off}
{include file="export:html:header.tpl"}
{if $icon}<div id="profile-icon">{$icon}</div>{/if}
......@@ -19,3 +20,4 @@
{/foreach}
{include file="export:html:footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="export:html:header.tpl"}
{$view}
{include file="export:html:footer.tpl"}
{/auto_escape}
{auto_escape off}
{if $icon}<div id="profile-icon">{$icon}</div>{/if}
<div id="profile-introduction">{$introduction}</div>
<ul id="profile-links">
......@@ -5,3 +6,4 @@
<li><a href="files/internal/index.html">{str tag=viewallprofileinformation section=artefact.internal}</a></li>
</ul>
<div class="cb"></div>
{/auto_escape}
{auto_escape off}
{include file="export:leap:entry.tpl" skipfooter=true}
{foreach from=$persondata item=entry}
<leap:persondata
......@@ -22,3 +23,4 @@
</leap:spatial>
{/if}
{include file="export:leap:entryfooter.tpl"}
{/auto_escape}
{auto_escape off}
<tr>
<td style="width: 20px;" rowspan="2">
{$formcontrols}
......@@ -7,3 +8,4 @@
<tr>
<td>{if $artefact->description}{$artefact->description}{/if}</td>
</tr>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<div class="rbuttons">
......@@ -11,3 +12,4 @@
</script>
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<p>
{$message|escape}
</p>
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{if $coverletter}<h2>{str tag=coverletter section=artefact.resume}</h2>
{$coverletter}{/if}
......@@ -26,3 +27,4 @@
{if $membership}<h2>{str tag=membership section=artefact.resume}</h2>
{$membership}{/if}
{/auto_escape}
{auto_escape off}
{include file="export:html:header.tpl"}
{if $coverletter}
......@@ -100,3 +101,4 @@
{/if}
{include file="export:html:footer.tpl"}
{/auto_escape}
{auto_escape off}
<p><a href="files/resume/index.html">{str tag=viewyourresume section=artefact.resume}</a></p>
{/auto_escape}
{auto_escape off}
{include file="export:leap:entry.tpl" skipfooter=true}
{if $start} <leap:date leap:point="start" leap:label="{$start|escape}"></leap:date>
{/if}
{if $end} <leap:date leap:point="end" leap:label="{$end|escape}"></leap:date>
{/if}
{include file="export:leap:entryfooter.tpl"}
{/auto_escape}
{auto_escape off}
<tr>
<td style="width: 20px;" rowspan="2">
{$formcontrols}
......@@ -7,3 +8,4 @@
<tr>
<td>{$artefact->description|str_shorten_html}</td>
</tr>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<h3>{str tag='editing'}: {str tag=$composite section='artefact.resume'}</h3>
{$compositeform}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
<fieldset>{if !$hidetitle}<legend class="resumeh3">{str tag='book' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addbook'}
......@@ -32,3 +33,4 @@
</div>
{/if}
</fieldset>
{/auto_escape}
{auto_escape off}
<fieldset>{if !$hidetitle}<legend class="resumeh3">{str tag='certification' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addcertification'}
......@@ -32,3 +33,4 @@
</div>
{/if}
</fieldset>
{/auto_escape}
{auto_escape off}
<table class="resumecontactinfo">
<tr>
<th>{str tag='address' section='artefact.internal'}</th>
......@@ -35,3 +36,4 @@
<td colspan="2"> <button onClick="return editprofilebutton();">{str tag='editprofile' section='artefact.internal'}</button></td>
</tr>
</table>
{/auto_escape}
{auto_escape off}
{if $hascontent}
<table class="resumecontactinfo">
<colgroup width="50%" span="2"></colgroup>
......@@ -51,3 +52,4 @@
{/if}
</table>
{/if}
{/auto_escape}
{auto_escape off}
<fieldset>{if !$hidetitle}<legend class="resumeh3">{str tag='educationhistory' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addeducationhistory'}
......@@ -34,3 +35,4 @@
</div>
{/if}
</fieldset>
{/auto_escape}
{auto_escape off}
<fieldset>{if !$hidetitle}<legend class="resumeh3">{str tag='employmenthistory' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addemploymenthistory'}
......@@ -35,3 +36,4 @@
</div>
{/if}
</fieldset>
{/auto_escape}
{auto_escape off}
<h3 class="resumeh3">{$type}</h3>
<p>{$content}</p>
{/auto_escape}
{auto_escape off}
<fieldset>{if !$hidetitle}<legend class="resumeh3">{str tag='membership' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addmembership'}
......@@ -34,3 +35,4 @@
</div>
{/if}
</fieldset>
{/auto_escape}
{auto_escape off}
<table class="resumepersonalinfo">
<colgroup width="50%" span="2"></colgroup>
{foreach from=$fields key='field' item='value'}
......@@ -7,3 +8,4 @@
</tr>
{/foreach}
</table>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{$goalform}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
<div id="resumewrap">
{$coverletterform}
......@@ -11,3 +12,4 @@
{include file="artefact:resume:fragments/membership.tpl" controls="true"}