This PR intentionally removes a lot of unnecessary uses of the `@` operator. Having a few more calls to `htmlspecialchars()` makes no difference, but avoids potential security issues now or in the future, for example, when performing refactors.
Closes #424
the cache more often that it needs to be.
```html
-<script data-relocate="true" src="{$__wcf->getPath('app')}js/App.js?t={@LAST_UPDATE_TIME}"></script>
+<script data-relocate="true" src="{$__wcf->getPath('app')}js/App.js?t={LAST_UPDATE_TIME}"></script>
```
For small scripts you can simply serve the full, non-minified version to the user
`ENABLE_DEBUG_MODE` constant to decide which version should be loaded.
```html
-<script data-relocate="true" src="{$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}.min{/if}.js?t={@LAST_UPDATE_TIME}"></script>
+<script data-relocate="true" src="{$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}.min{/if}.js?t={LAST_UPDATE_TIME}"></script>
```
### The Accelerated Guest View ("Tiny Builds")
If you are providing a separate compiled build for this mode, you'll need to include yet another switch to serve the right version to the visitor.
```html
-<script data-relocate="true" src="{$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}{if VISITOR_USE_TINY_BUILD}.tiny{/if}.min{/if}.js?t={@LAST_UPDATE_TIME}"></script>
+<script data-relocate="true" src="{$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}{if VISITOR_USE_TINY_BUILD}.tiny{/if}.min{/if}.js?t={LAST_UPDATE_TIME}"></script>
```
### The `{js}` Template Plugin
# Migrating from WoltLab Suite 6.0 - Templates
+## `unsafe` Prefix
+
+The `unsafe` prefix is intended as a replacement for the `@` prefix in order to output the content of a variable unfiltered. The new prefix offers better readability and makes it easier to find places where the prefix is used unintentionally. The old `@` prefix is still supported, but we recommend using the new prefix for new code.
+
+Usage:
+
+```smarty
+Old: {@$foo}
+New: {unsafe:$foo}
+```
+
+The code listed above outputs the raw content of the variable `$foo`.
+
## Shared Templates
Shared templates, applicable both in the frontend and the backend, are now standardized to begin with the
The only thing to do in a template to display the **whole** form including all of the necessary JavaScript is to put
```smarty
-{@$form->getHtml()}
+{unsafe:$form->getHtml()}
```
into the template file at the relevant position.
We will now only concentrate on the new parts compared to `personList.tpl`:
1. We use the `$action` variable to distinguish between the languages items used for adding a person and for creating a person.
-1. Because of form builder, we only have to call `{@$form->getHtml()}` to generate all relevant output for the form.
+1. Because of form builder, we only have to call `{unsafe:$form->getHtml()}` to generate all relevant output for the form.
### Person Edit Form
The code for the table head is similar to the other `th` elements:
```smarty
-<th class="columnDate columnBirthday{if $sortField == 'birthday'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=birthday&sortOrder={if $sortField == 'birthday' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.birthday{/lang}</a></th>
+<th class="columnDate columnBirthday{if $sortField == 'birthday'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=birthday&sortOrder={if $sortField == 'birthday' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.birthday{/lang}</a></th>
```
For the table body’s column, we need to make sure that the birthday is only show if it is actually set:
```smarty
-<td class="columnDate columnBirthday">{if $person->birthday}{@$person->birthday|strtotime|date}{/if}</td>
+<td class="columnDate columnBirthday">{if $person->birthday}{$person->birthday|strtotime|date}{/if}</td>
```
```smarty
<script>
- var foo = '{@$foo|encodeJS}';
+ var foo = '{unsafe:$foo|encodeJS}';
</script>
```
`escapeCDATA` encodes a string to be used in a `CDATA` element by replacing `]]>` with `]]]]><![CDATA[>`.
```smarty
-<![CDATA[{@$foo|encodeCDATA}]]>
+<![CDATA[{unsafe:$foo|encodeCDATA}]]>
```
```smarty
<script>
-let data = { "title": {@$foo->getTitle()|json} };
+let data = { "title": {unsafe:$foo->getTitle()|json} };
</script>
```
```smarty
{pages controller='FooList' link="pageNo=%d" print=true assign=pagesLinks} {* prints pagination *}
-{@$pagesLinks} {* prints same pagination again *}
+{unsafe:$pagesLinks} {* prints same pagination again *}
```
| Attribute | Description |
generates
```smarty
-<a href="{$user->getLink()}" data-object-id="{$user->userID}" class="userLink">{@$user->getFormattedUsername()}</a>
+<a href="{$user->getLink()}" data-object-id="{$user->userID}" class="userLink">{unsafe:$user->getFormattedUsername()}</a>
```
and
generates
```smarty
-<a href="{$user->getLink()}" foo="bar">{@$object->getAvatar()->getImageTag(48)}</a>
+<a href="{$user->getLink()}" foo="bar">{unsafe:$object->getAvatar()->getImageTag(48)}</a>
```
{if $errorType == 'empty'}
{lang}wcf.global.form.error.empty{/lang}
{else}
- {lang}foo.bar.baz.error.{@$errorType}{/lang}
+ {lang}foo.bar.baz.error.{$errorType}{/lang}
{/if}
</small>
{/if}
<dd>
<textarea name="bar" id="bar" cols="40" rows="10">{$bar}</textarea>
{if $errorField == 'bar'}
- <small class="innerError">{lang}foo.bar.bar.error.{@$errorType}{/lang}</small>
+ <small class="innerError">{lang}foo.bar.bar.error.{$errorType}{/lang}</small>
{/if}
</dd>
</dl>
- `{$foo}` will result in the contents of `$foo` to be passed to `StringUtil::encodeHTML()` before being printed.
- `{#$foo}` will result in the contents of `$foo` to be passed to `StringUtil::formatNumeric()` before being printed.
Thus, this method is relevant when printing numbers and having them formatted correctly according the the user’s language.
-- `{@$foo}` will result in the contents of `$foo` to be printed directly.
- In general, this method should not be used for user-generated input.
+- `{unsafe:$foo}` will result in the contents of `$foo` to be printed directly.
+ This method should only be used if you want to output the content of the variable directly and unfiltered.
+ Never use this method for user-generated input that has not already been sanitized by other means.
Multiple template variables can be assigned by passing an array:
</nav>
</header>
-{@$form->getHtml()}
+{unsafe:$form->getHtml()}
{include file='footer'}
<table class="table jsObjectActionContainer" data-object-action-class-name="wcf\data\person\PersonAction">
<thead>
<tr>
- <th class="columnID columnPersonID{if $sortField == 'personID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
- <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
- <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
+ <th class="columnID columnPersonID{if $sortField == 'personID'} active {$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
+ <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
+ <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
{event name='columnHeads'}
</tr>
<tbody class="jsReloadPageWhenEmpty">
{foreach from=$objects item=person}
- <tr class="jsObjectActionObject" data-object-id="{@$person->getObjectID()}">
+ <tr class="jsObjectActionObject" data-object-id="{$person->getObjectID()}">
<td class="columnIcon">
<a href="{link controller='PersonEdit' object=$person}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
{objectAction action="delete" objectTitle=$person->getTitle()}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
{capture assign='headContent'}
{if $pageNo < $pages}
- <link rel="next" href="{link controller='PersonList'}pageNo={@$pageNo+1}{/link}">
+ <link rel="next" href="{link controller='PersonList'}pageNo={$pageNo+1}{/link}">
{/if}
{if $pageNo > 1}
- <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}">
+ <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={$pageNo-1}{/if}{/link}">
{/if}
- <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={@$pageNo}{/if}{/link}">
+ <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={$pageNo}{/if}{/link}">
{/capture}
{capture assign='sidebarRight'}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
<templatelistener name="personListBirthdayColumnHead">
<eventname>columnHeads</eventname>
<environment>admin</environment>
- <templatecode><![CDATA[<th class="columnDate columnBirthday{if $sortField == 'birthday'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=birthday&sortOrder={if $sortField == 'birthday' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.birthday{/lang}</a></th>]]></templatecode>
+ <templatecode><![CDATA[<th class="columnDate columnBirthday{if $sortField == 'birthday'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=birthday&sortOrder={if $sortField == 'birthday' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.birthday{/lang}</a></th>]]></templatecode>
<templatename>personList</templatename>
</templatelistener>
<templatelistener name="personListBirthdayColumn">
<eventname>columns</eventname>
<environment>admin</environment>
- <templatecode><![CDATA[<td class="columnDate columnBirthday">{if $person->birthday}{@$person->birthday|strtotime|date}{/if}</td>]]></templatecode>
+ <templatecode><![CDATA[<td class="columnDate columnBirthday">{if $person->birthday}{$person->birthday|strtotime|date}{/if}</td>]]></templatecode>
<templatename>personList</templatename>
</templatelistener>
<!-- /admin -->
{if $person->birthday}
<dt>{lang}wcf.person.birthday{/lang}</dt>
- <dd>{@$person->birthday|strtotime|date}</dd>
+ <dd>{$person->birthday|strtotime|date}</dd>
{/if}
</nav>
</header>
-{@$form->getHtml()}
+{unsafe:$form->getHtml()}
{include file='footer'}
<table class="table jsObjectActionContainer" data-object-action-class-name="wcf\data\person\PersonAction">
<thead>
<tr>
- <th class="columnID columnPersonID{if $sortField == 'personID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
- <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
- <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
+ <th class="columnID columnPersonID{if $sortField == 'personID'} active {$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
+ <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
+ <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
{event name='columnHeads'}
</tr>
<tbody class="jsReloadPageWhenEmpty">
{foreach from=$objects item=person}
- <tr class="jsObjectActionObject" data-object-id="{@$person->getObjectID()}">
+ <tr class="jsObjectActionObject" data-object-id="{$person->getObjectID()}">
<td class="columnIcon">
<a href="{link controller='PersonEdit' object=$person}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
{objectAction action="delete" objectTitle=$person->getTitle()}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
<div class="personComments">
<ul id="personCommentList" class="commentList containerList" {*
*}data-can-add="{if $commentCanAdd}true{else}false{/if}" {*
- *}data-object-id="{@$person->personID}" {*
- *}data-object-type-id="{@$commentObjectTypeID}" {*
- *}data-comments="{if $person->comments}{@$commentList->countObjects()}{else}0{/if}" {*
- *}data-last-comment-time="{@$lastCommentTime}" {*
+ *}data-object-id="{$person->personID}" {*
+ *}data-object-type-id="{$commentObjectTypeID}" {*
+ *}data-comments="{if $person->comments}{$commentList->countObjects()}{else}0{/if}" {*
+ *}data-last-comment-time="{$lastCommentTime}" {*
*}>
{include file='commentListAddComment' wysiwygSelector='personCommentListAddComment'}
{include file='commentList'}
{capture assign='headContent'}
{if $pageNo < $pages}
- <link rel="next" href="{link controller='PersonList'}pageNo={@$pageNo+1}{/link}">
+ <link rel="next" href="{link controller='PersonList'}pageNo={$pageNo+1}{/link}">
{/if}
{if $pageNo > 1}
- <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}">
+ <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={$pageNo-1}{/if}{/link}">
{/if}
- <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={@$pageNo}{/if}{/link}">
+ <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={$pageNo}{/if}{/link}">
{/capture}
{capture assign='sidebarRight'}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
</nav>
</header>
-{@$form->getHtml()}
+{unsafe:$form->getHtml()}
{include file='footer'}
<table class="table jsObjectActionContainer" data-object-action-class-name="wcf\data\person\PersonAction">
<thead>
<tr>
- <th class="columnID columnPersonID{if $sortField == 'personID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
- <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
- <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
+ <th class="columnID columnPersonID{if $sortField == 'personID'} active {$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
+ <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
+ <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
{event name='columnHeads'}
</tr>
<tbody class="jsReloadPageWhenEmpty">
{foreach from=$objects item=person}
- <tr class="jsObjectActionObject" data-object-id="{@$person->getObjectID()}">
+ <tr class="jsObjectActionObject" data-object-id="{$person->getObjectID()}">
<td class="columnIcon">
<a href="{link controller='PersonEdit' object=$person}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
{objectAction action="delete" objectTitle=$person->getTitle()}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
<h3>{anchor object=$boxPerson}</h3>
{capture assign='__boxPersonDescription'}{lang __optional=true}wcf.person.boxList.description.{$boxSortField}{/lang}{/capture}
{if $__boxPersonDescription}
- <small>{@$__boxPersonDescription}</small>
+ <small>{unsafe:$__boxPersonDescription}</small>
{/if}
</div>
</li>
<div class="personComments">
<ul id="personCommentList" class="commentList containerList" {*
*}data-can-add="{if $commentCanAdd}true{else}false{/if}" {*
- *}data-object-id="{@$person->personID}" {*
- *}data-object-type-id="{@$commentObjectTypeID}" {*
- *}data-comments="{if $person->comments}{@$commentList->countObjects()}{else}0{/if}" {*
- *}data-last-comment-time="{@$lastCommentTime}" {*
+ *}data-object-id="{$person->personID}" {*
+ *}data-object-type-id="{$commentObjectTypeID}" {*
+ *}data-comments="{if $person->comments}{$commentList->countObjects()}{else}0{/if}" {*
+ *}data-last-comment-time="{$lastCommentTime}" {*
*}>
{include file='commentListAddComment' wysiwygSelector='personCommentListAddComment'}
{include file='commentList'}
{capture assign='headContent'}
{if $pageNo < $pages}
- <link rel="next" href="{link controller='PersonList'}pageNo={@$pageNo+1}{/link}">
+ <link rel="next" href="{link controller='PersonList'}pageNo={$pageNo+1}{/link}">
{/if}
{if $pageNo > 1}
- <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}">
+ <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={$pageNo-1}{/if}{/link}">
{/if}
- <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={@$pageNo}{/if}{/link}">
+ <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={$pageNo}{/if}{/link}">
{/capture}
{capture assign='sidebarRight'}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
</nav>
</header>
-{@$form->getHtml()}
+{unsafe:$form->getHtml()}
{include file='footer'}
<table class="table jsObjectActionContainer" data-object-action-class-name="wcf\data\person\PersonAction">
<thead>
<tr>
- <th class="columnID columnPersonID{if $sortField == 'personID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
- <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
- <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
+ <th class="columnID columnPersonID{if $sortField == 'personID'} active {$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
+ <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
+ <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
{event name='columnHeads'}
</tr>
<tbody class="jsReloadPageWhenEmpty">
{foreach from=$objects item=person}
- <tr class="jsObjectActionObject" data-object-id="{@$person->getObjectID()}">
+ <tr class="jsObjectActionObject" data-object-id="{$person->getObjectID()}">
<td class="columnIcon">
<a href="{link controller='PersonEdit' object=$person}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
{objectAction action="delete" objectTitle=$person->getTitle()}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
<h3>{anchor object=$boxPerson}</h3>
{capture assign='__boxPersonDescription'}{lang __optional=true}wcf.person.boxList.description.{$boxSortField}{/lang}{/capture}
{if $__boxPersonDescription}
- <small>{@$__boxPersonDescription}</small>
+ <small>{unsafe:$__boxPersonDescription}</small>
{/if}
</div>
</li>
{/if}
{foreach from=$person->getInformation() item=$information}
- <li class="comment personInformation jsObjectActionObject" data-object-id="{@$information->getObjectID()}">
+ <li class="comment personInformation jsObjectActionObject" data-object-id="{$information->getObjectID()}">
<div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($information->userID, 2)} ignoredUserContent{/if}">
{user object=$information->getUserProfile() type='avatar48' ariaHidden='true' tabindex='-1'}
<span>{$information->username}</span>
{/if}
- <small class="separatorLeft">{@$information->time|time}</small>
+ <small class="separatorLeft">{unsafe:$information->time|time}</small>
</h3>
</div>
- <div class="htmlContent userMessage" id="personInformation{@$information->getObjectID()}">
- {@$information->getFormattedInformation()}
+ <div class="htmlContent userMessage" id="personInformation{$information->getObjectID()}">
+ {unsafe:$information->getFormattedInformation()}
</div>
<nav class="jsMobileNavigation buttonGroupNavigation">
<div class="personComments">
<ul id="personCommentList" class="commentList containerList" {*
*}data-can-add="{if $commentCanAdd}true{else}false{/if}" {*
- *}data-object-id="{@$person->personID}" {*
- *}data-object-type-id="{@$commentObjectTypeID}" {*
- *}data-comments="{if $person->comments}{@$commentList->countObjects()}{else}0{/if}" {*
- *}data-last-comment-time="{@$lastCommentTime}" {*
+ *}data-object-id="{$person->personID}" {*
+ *}data-object-type-id="{$commentObjectTypeID}" {*
+ *}data-comments="{if $person->comments}{$commentList->countObjects()}{else}0{/if}" {*
+ *}data-last-comment-time="{$lastCommentTime}" {*
*}>
{include file='commentListAddComment' wysiwygSelector='personCommentListAddComment'}
{include file='commentList'}
'wcf.person.information.edit.success': '{jslang}wcf.person.information.edit.success{/jslang}',
});
- ControllerPerson.init({@$person->personID}, {
+ ControllerPerson.init({$person->personID}, {
canAddInformation: {if $__wcf->session->getPermission('user.person.canAddInformation')}true{else}false{/if},
});
});
{capture assign='headContent'}
{if $pageNo < $pages}
- <link rel="next" href="{link controller='PersonList'}pageNo={@$pageNo+1}{/link}">
+ <link rel="next" href="{link controller='PersonList'}pageNo={$pageNo+1}{/link}">
{/if}
{if $pageNo > 1}
- <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}">
+ <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={$pageNo-1}{/if}{/link}">
{/if}
- <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={@$pageNo}{/if}{/link}">
+ <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={$pageNo}{/if}{/link}">
{/capture}
{capture assign='sidebarRight'}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
</nav>
</header>
-{@$form->getHtml()}
+{unsafe:$form->getHtml()}
{include file='footer'}
<table class="table jsObjectActionContainer" data-object-action-class-name="wcf\data\person\PersonAction">
<thead>
<tr>
- <th class="columnID columnPersonID{if $sortField == 'personID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
- <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
- <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
+ <th class="columnID columnPersonID{if $sortField == 'personID'} active {$sortOrder}{/if}" colspan="2"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=personID&sortOrder={if $sortField == 'personID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
+ <th class="columnTitle columnFirstName{if $sortField == 'firstName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=firstName&sortOrder={if $sortField == 'firstName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.firstName{/lang}</a></th>
+ <th class="columnTitle columnLastName{if $sortField == 'lastName'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={$pageNo}&sortField=lastName&sortOrder={if $sortField == 'lastName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.lastName{/lang}</a></th>
{event name='columnHeads'}
</tr>
<tbody class="jsReloadPageWhenEmpty">
{foreach from=$objects item=person}
- <tr class="jsObjectActionObject" data-object-id="{@$person->getObjectID()}">
+ <tr class="jsObjectActionObject" data-object-id="{$person->getObjectID()}">
<td class="columnIcon">
<a href="{link controller='PersonEdit' object=$person}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
{objectAction action="delete" objectTitle=$person->getTitle()}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}
<h3>{anchor object=$boxPerson}</h3>
{capture assign='__boxPersonDescription'}{lang __optional=true}wcf.person.boxList.description.{$boxSortField}{/lang}{/capture}
{if $__boxPersonDescription}
- <small>{@$__boxPersonDescription}</small>
+ <small>{unsafe:$__boxPersonDescription}</small>
{/if}
</div>
</li>
{/if}
{foreach from=$person->getInformation() item=$information}
- <li class="comment personInformation jsObjectActionObject" data-object-id="{@$information->getObjectID()}">
+ <li class="comment personInformation jsObjectActionObject" data-object-id="{$information->getObjectID()}">
<div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($information->userID, 2)} ignoredUserContent{/if}">
{user object=$information->getUserProfile() type='avatar48' ariaHidden='true' tabindex='-1'}
<span>{$information->username}</span>
{/if}
- <small class="separatorLeft">{@$information->time|time}</small>
+ <small class="separatorLeft">{unsafe:$information->time|time}</small>
</h3>
</div>
- <div class="htmlContent userMessage" id="personInformation{@$information->getObjectID()}">
- {@$information->getFormattedInformation()}
+ <div class="htmlContent userMessage" id="personInformation{$information->getObjectID()}">
+ {unsafe:$information->getFormattedInformation()}
</div>
<nav class="jsMobileNavigation buttonGroupNavigation">
<div class="personComments">
<ul id="personCommentList" class="commentList containerList" {*
*}data-can-add="{if $commentCanAdd}true{else}false{/if}" {*
- *}data-object-id="{@$person->personID}" {*
- *}data-object-type-id="{@$commentObjectTypeID}" {*
- *}data-comments="{if $person->comments}{@$commentList->countObjects()}{else}0{/if}" {*
- *}data-last-comment-time="{@$lastCommentTime}" {*
+ *}data-object-id="{$person->personID}" {*
+ *}data-object-type-id="{$commentObjectTypeID}" {*
+ *}data-comments="{if $person->comments}{$commentList->countObjects()}{else}0{/if}" {*
+ *}data-last-comment-time="{$lastCommentTime}" {*
*}>
{include file='commentListAddComment' wysiwygSelector='personCommentListAddComment'}
{include file='commentList'}
'wcf.person.information.edit.success': '{jslang}wcf.person.information.edit.success{/jslang}',
});
- ControllerPerson.init({@$person->personID}, {
+ ControllerPerson.init({$person->personID}, {
canAddInformation: {if $__wcf->session->getPermission('user.person.canAddInformation')}true{else}false{/if},
});
});
{capture assign='headContent'}
{if $pageNo < $pages}
- <link rel="next" href="{link controller='PersonList'}pageNo={@$pageNo+1}{/link}">
+ <link rel="next" href="{link controller='PersonList'}pageNo={$pageNo+1}{/link}">
{/if}
{if $pageNo > 1}
- <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}">
+ <link rel="prev" href="{link controller='PersonList'}{if $pageNo > 2}pageNo={$pageNo-1}{/if}{/link}">
{/if}
- <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={@$pageNo}{/if}{/link}">
+ <link rel="canonical" href="{link controller='PersonList'}{if $pageNo > 1}pageNo={$pageNo}{/if}{/link}">
{/capture}
{capture assign='sidebarRight'}
<footer class="contentFooter">
{hascontent}
<div class="paginationBottom">
- {content}{@$pagesLinks}{/content}
+ {content}{unsafe:$pagesLinks}{/content}
</div>
{/hascontent}