Skip to content

Commit a0fe0e6

Browse files
committed
Remove unnecessary @ and replace all other @ with unsafe:
1 parent f47ba4e commit a0fe0e6

9 files changed

Lines changed: 35 additions & 35 deletions

File tree

wcfsetup/install/files/acp/templates/error.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{if $exception !== null}
55
<!--
66
{* A comment may not contain double dashes. *}
7-
{@'--'|str_replace:'- -':$exception}
7+
{unsafe:'--'|str_replace:'- -':$exception}
88
-->
99
{/if}
1010
{/if}
@@ -19,7 +19,7 @@
1919
<div class="box64 userException">
2020
{icon size=64 name='circle-exclamation'}
2121
<p class="userExceptionMessage">
22-
{@$message}
22+
{unsafe:$message}
2323
</p>
2424
</div>
2525
</div>

wcfsetup/install/files/acp/templates/header.tpl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<!DOCTYPE html>
22
<html
3-
dir="{@$__wcf->getLanguage()->getPageDirection()}"
3+
dir="{$__wcf->getLanguage()->getPageDirection()}"
44
lang="{$__wcf->getLanguage()->getBcp47()}"
55
data-color-scheme="{$__wcf->getStyleHandler()->getColorScheme()}"
66
>
77
<head>
88
<meta charset="utf-8">
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="robots" content="noindex">
11-
<title>{if $pageTitle|isset}{@$pageTitle|language} - {/if}{jslang}wcf.global.acp{/jslang}{if PACKAGE_ID} - {PAGE_TITLE|phrase}{/if}</title>
11+
<title>{if $pageTitle|isset}{unsafe:$pageTitle|language} - {/if}{jslang}wcf.global.acp{/jslang}{if PACKAGE_ID} - {PAGE_TITLE|phrase}{/if}</title>
1212

1313
{* work-around for Microsoft Edge that sometimes does not apply this style, if it was set via an external stylesheet *}
1414
<style>ol, ul { list-style: none; }</style>
1515

1616
<!-- Stylesheets -->
17-
{@$__wcf->getStyleHandler()->getStylesheet(true)}
17+
{unsafe:$__wcf->getStyleHandler()->getStylesheet(true)}
1818
{event name='stylesheets'}
1919

2020
<!-- Icons -->
@@ -48,14 +48,14 @@
4848
<meta name="timezone" content="{$__wcf->user->getTimeZone()->getName()}">
4949

5050
<script data-eager="true">
51-
var WCF_PATH = '{@$__wcf->getPath()}';
52-
var WSC_API_URL = '{@$__wcf->getPath()}acp/';
51+
var WCF_PATH = '{unsafe:$__wcf->getPath()|encodeJS}';
52+
var WSC_API_URL = '{unsafe:$__wcf->getPath()|encodeJS}acp/';
5353
var WSC_RPC_API_URL = '{link controller="Api" forceFrontend=true id="rpc"}{/link}';
5454
{* The SECURITY_TOKEN is defined in wcf.globalHelper.js *}
55-
var LANGUAGE_ID = {@$__wcf->getLanguage()->languageID};
55+
var LANGUAGE_ID = {$__wcf->getLanguage()->languageID};
5656
var LANGUAGE_USE_INFORMAL_VARIANT = {if LANGUAGE_USE_INFORMAL_VARIANT}true{else}false{/if};
57-
var TIME_NOW = {@TIME_NOW};
58-
var LAST_UPDATE_TIME = {@LAST_UPDATE_TIME};
57+
var TIME_NOW = {TIME_NOW};
58+
var LAST_UPDATE_TIME = {LAST_UPDATE_TIME};
5959
var ENABLE_DEBUG_MODE = {if ENABLE_DEBUG_MODE}true{else}false{/if};
6060
var ENABLE_PRODUCTION_DEBUG_MODE = {if ENABLE_PRODUCTION_DEBUG_MODE}true{else}false{/if};
6161
var ENABLE_DEVELOPER_TOOLS = {if ENABLE_DEVELOPER_TOOLS}true{else}false{/if};
@@ -65,7 +65,7 @@
6565
var COMPILER_TARGET_DEFAULT = true;
6666
</script>
6767

68-
<script data-eager="true" src="{$__wcf->getPath()}js/WoltLabSuite/WebComponent.min.js?v={@LAST_UPDATE_TIME}"></script>
68+
<script data-eager="true" src="{$__wcf->getPath()}js/WoltLabSuite/WebComponent.min.js?v={LAST_UPDATE_TIME}"></script>
6969
<script data-eager="true" src="{$phrasePreloader->getUrl($__wcf->language)}"></script>
7070

7171
{js application='wcf' file='require' bundle='WoltLabSuite.Core' core='true'}
@@ -75,8 +75,8 @@
7575
{js application='wcf' file='3rdParty/tslib' bundle='WoltLabSuite.Core' core='true'}
7676
<script>
7777
requirejs.config({
78-
baseUrl: '{@$__wcf->getPath()}js',
79-
urlArgs: 't={@LAST_UPDATE_TIME}'
78+
baseUrl: '{unsafe:$__wcf->getPath()|encodeJS}js',
79+
urlArgs: 't={LAST_UPDATE_TIME}'
8080
{hascontent}
8181
, paths: {
8282
{content}{event name='requirePaths'}{/content}
@@ -94,9 +94,9 @@
9494
});
9595
9696
User.init(
97-
{@$__wcf->user->userID},
98-
{if $__wcf->user->userID}'{@$__wcf->user->username|encodeJS}'{else}''{/if},
99-
{if $__wcf->user->userID}'{@$__wcf->user->getLink()|encodeJS}'{else}''{/if}
97+
{$__wcf->user->userID},
98+
{if $__wcf->user->userID}'{unsafe:$__wcf->user->username|encodeJS}'{else}''{/if},
99+
{if $__wcf->user->userID}'{unsafe:$__wcf->user->getLink()|encodeJS}'{else}''{/if}
100100
);
101101
102102
AcpBootstrap.setup({
@@ -126,8 +126,8 @@
126126
define.amd = __require_define_amd;
127127
$.holdReady(true);
128128
WCF.User.init(
129-
{@$__wcf->user->userID},
130-
{if $__wcf->user->userID}'{@$__wcf->user->username|encodeJS}'{else}''{/if}
129+
{$__wcf->user->userID},
130+
{if $__wcf->user->userID}'{unsafe:$__wcf->user->username|encodeJS}'{else}''{/if}
131131
);
132132
</script>
133133
{js application='wcf' file='WCF.Message' bundle='WCF.Combined'}
@@ -165,7 +165,7 @@
165165
{event name='javascriptInclude'}
166166

167167
{if !$headContent|empty}
168-
{@$headContent}
168+
{unsafe:$headContent}
169169
{/if}
170170
</head>
171171

wcfsetup/install/files/acp/templates/index.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<div class="acpDashboardBox" data-name="{$box->getName()}">
3232
<h2 class="acpDashboardBox__title">{$box->getTitle()}</h2>
3333
<div class="acpDashboardBox__content">
34-
{@$box->getContent()}
34+
{unsafe:$box->getContent()}
3535
</div>
3636
</div>
3737
{/foreach}

wcfsetup/install/files/acp/templates/pageHeaderLogo.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"
88
>
99
<a href="{link}{/link}">
10-
<img src="{@$__wcf->getPath()}acp/images/woltlabSuite.png" alt="" width="562" height="80" loading="eager" class="pageHeaderLogoLarge">
11-
<img src="{@$__wcf->getPath()}acp/images/woltlabSuite-small.png" alt="" width="55" height="30" loading="eager" class="pageHeaderLogoSmall">
10+
<img src="{$__wcf->getPath()}acp/images/woltlabSuite.png" alt="" width="562" height="80" loading="eager" class="pageHeaderLogoLarge">
11+
<img src="{$__wcf->getPath()}acp/images/woltlabSuite-small.png" alt="" width="55" height="30" loading="eager" class="pageHeaderLogoSmall">
1212
</a>
13-
</div>
13+
</div>

wcfsetup/install/files/acp/templates/pageHeaderSearch.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<li class="dropdownDivider"></li>
1515

1616
{foreach from=$availableAcpSearchProviders key='availableAcpSearchProviderName' item='availableAcpSearchProviderLabel'}
17-
<li><a href="#" data-provider-name="{@$availableAcpSearchProviderName}">{@$availableAcpSearchProviderLabel}</a></li>
17+
<li><a href="#" data-provider-name="{$availableAcpSearchProviderName}">{unsafe:$availableAcpSearchProviderLabel}</a></li>
1818
{/foreach}
1919
</ul>
2020
</div>

wcfsetup/install/files/acp/templates/pageHeaderUser.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{if $__wcf->user->userID}
44
{if PACKAGE_ID}
55
<li id="userMenu" class="dropdown">
6-
<a href="#" class="dropdownToggle jsTooltip" title="{$__wcf->user->username}">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(24)}</a>
6+
<a href="#" class="dropdownToggle jsTooltip" title="{$__wcf->user->username}">{unsafe:$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(24)}</a>
77
<ul class="dropdownMenu dropdownMenuUserPanel" data-dropdown-alignment-horizontal="right">
88
<li><a href="{link controller='Logout'}t={csrfToken type=url}{/link}">{lang}wcf.user.logout{/lang}</a></li>
99
</ul>

wcfsetup/install/files/acp/templates/phpInfo.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<h1 class="contentTitle">PHP Version {PHP_VERSION}</h1>
55
</header>
66

7-
{@$phpInfo}
7+
{unsafe:$phpInfo}
88

99
{include file='footer'}

wcfsetup/install/files/acp/templates/rescueMode.tpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html dir="{@$__wcf->getLanguage()->getPageDirection()}" lang="{@$__wcf->getLanguage()->getFixedLanguageCode()}">
2+
<html dir="{$__wcf->getLanguage()->getPageDirection()}" lang="{$__wcf->getLanguage()->getFixedLanguageCode()}">
33
<head>
44
<meta charset="utf-8">
55
<meta name="robots" content="noindex">
@@ -63,7 +63,7 @@
6363
{elseif $errorType == 'notAuthorized'}
6464
{lang}wcf.acp.rescueMode.username.notAuthorized{/lang}
6565
{else}
66-
{lang}wcf.user.username.error.{@$errorType}{/lang}
66+
{lang}wcf.user.username.error.{$errorType}{/lang}
6767
{/if}
6868
</small>
6969
{/if}
@@ -79,7 +79,7 @@
7979
{if $errorType == 'empty'}
8080
{lang}wcf.global.form.error.empty{/lang}
8181
{else}
82-
{lang}wcf.user.password.error.{@$errorType}{/lang}
82+
{lang}wcf.user.password.error.{$errorType}{/lang}
8383
{/if}
8484
</small>
8585
{/if}
@@ -105,7 +105,7 @@
105105
{if $errorType == 'empty'}
106106
{lang}wcf.global.form.error.empty{/lang}
107107
{else}
108-
{lang}wcf.acp.application.domainName.error.{@$errorType}{/lang}
108+
{lang}wcf.acp.application.domainName.error.{$errorType}{/lang}
109109
{/if}
110110
</small>
111111
{/if}
@@ -120,21 +120,21 @@
120120
</header>
121121

122122
{foreach from=$applications item=application}
123-
{capture assign=applicationSectionPath}application_{@$application->packageID}{/capture}
123+
{capture assign=applicationSectionPath}application_{$application->packageID}{/capture}
124124

125125
<dl{if $errorField == $applicationSectionPath} class="formError"{/if}>
126-
<dt><label for="application{@$application->packageID}">{$application->getPackage()}</label></dt>
126+
<dt><label for="application{$application->packageID}">{$application->getPackage()}</label></dt>
127127
<dd>
128128
<div class="inputAddon">
129129
<span class="inputPrefix">{lang}wcf.acp.application.domainPath{/lang}</span>
130-
<input type="text" name="applicationValues[{@$application->packageID}]" value="{$applicationValues[$application->packageID]}" class="long" required>
130+
<input type="text" name="applicationValues[{$application->packageID}]" value="{$applicationValues[$application->packageID]}" class="long" required>
131131
</div>
132132
{if $errorField == $applicationSectionPath}
133133
<small class="innerError">
134134
{if $errorType == 'empty'}
135135
{lang}wcf.global.form.error.empty{/lang}
136136
{else}
137-
{lang}wcf.acp.application.domainPath.error.{@$errorType}{/lang}
137+
{lang}wcf.acp.application.domainPath.error.{$errorType}{/lang}
138138
{/if}
139139
</small>
140140
{/if}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{include file='header' templateName='success' templateNameApplication='wcf'}
22

3-
<woltlab-core-notice type="success">{lang}{@$message}{/lang}</woltlab-core-notice>
3+
<woltlab-core-notice type="success">{lang}{unsafe:$message}{/lang}</woltlab-core-notice>
44

55
{include file='footer'}

0 commit comments

Comments
 (0)