Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions com.woltlab.wcf/templates/accountManagement.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
new PasswordStrength(elById('newPassword'), {
relatedInputs: relatedInputs,
staticDictionary: [
'{$__wcf->user->username|encodeJS}',
'{$__wcf->user->email|encodeJS}',
'{unsafe:$__wcf->user->username|encodeJS}',
'{unsafe:$__wcf->user->email|encodeJS}',
]
});
})
Expand Down
4 changes: 2 additions & 2 deletions com.woltlab.wcf/templates/headIncludeJavaScript.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ window.addEventListener('pageshow', function(event) {
],
{/if}
styleChanger: {if $__wcf->getStyleHandler()->showStyleChanger()}true{else}false{/if},
{if $__wcf->user->userID && !$__wcf->getMessageQuoteManager()->getRemoveQuoteIDs()|empty}removeQuotes: [{implode from=$__wcf->getMessageQuoteManager()->getRemoveQuoteIDs() item=uuid}'{$uuid|encodeJS}'{/implode}],{/if}
{if $__wcf->user->userID && !$__wcf->getMessageQuoteManager()->getRemoveQuoteIDs()|empty}removeQuotes: [{implode from=$__wcf->getMessageQuoteManager()->getRemoveQuoteIDs() item=uuid}'{unsafe:$uuid|encodeJS}'{/implode}],{/if}
{if $__wcf->user->userID && !$__wcf->getMessageQuoteManager()->getUsedQuotes()|empty}usedQuotes: new Map([
{foreach from=$__wcf->getMessageQuoteManager()->getUsedQuotes() key=editorID item=uuids}['{$editorID|encodeJS}', [{implode from=$uuids item=uuid}'{$uuid|encodeJS}'{/implode}]]{/foreach}
{foreach from=$__wcf->getMessageQuoteManager()->getUsedQuotes() key=editorID item=uuids}['{unsafe:$editorID|encodeJS}', [{implode from=$uuids item=uuid}'{unsafe:$uuid|encodeJS}'{/implode}]]{/foreach}
]),
{/if}
});
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
imagePreview: {if !$uploadField->supportMultipleFiles() && $uploadField->isImageOnly()}true{else}false{/if},
{if $uploadField->getAcceptableFiles()}
acceptableFiles: [
{implode from=$uploadField->getAcceptableFiles() item=accept}'{$accept|encodeJS}'{/implode}
{implode from=$uploadField->getAcceptableFiles() item=accept}'{unsafe:$accept|encodeJS}'{/implode}
],
{/if}
});
Expand Down
4 changes: 2 additions & 2 deletions com.woltlab.wcf/templates/shared_wysiwyg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

{include file='mediaJavaScript'}

const element = document.getElementById('{$wysiwygSelector|encodeJS}');
const element = document.getElementById('{unsafe:$wysiwygSelector|encodeJS}');
if (element === null) {
throw new Error("Unable to find the source element '{$wysiwygSelector|encodeJS}' for the editor.")
throw new Error("Unable to find the source element '{unsafe:$wysiwygSelector|encodeJS}' for the editor.")
}

let enableAttachments = element.dataset.disableAttachments !== "true";
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/shared_wysiwygCmsToolbar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{jsphrase name='wcf.page.search.name'}
{jsphrase name='wcf.page.search.results'}

const element = document.getElementById('{$wysiwygSelector|encodeJS}');
const element = document.getElementById('{unsafe:$wysiwygSelector|encodeJS}');
setupArticle(element);
setupPage(element);
});
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/userException.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{$stacktrace}
-->
<script>
console.debug('{$name|encodeJS} thrown in {$file|encodeJS} ({$line})');
console.debug('{unsafe:$name|encodeJS} thrown in {unsafe:$file|encodeJS} ({$line})');
console.debug('Stacktrace:\n{unsafe:$stacktrace|encodeJS}');
</script>
{/if}
Expand Down
7 changes: 2 additions & 5 deletions ts/WoltLabSuite/Core/Component/Option/Enable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,10 @@ function enableOption(element: HTMLElement, enable: boolean) {

const parentOptionTypeBoolean = element.closest(".optionTypeBoolean");
if (parentOptionTypeBoolean) {
// escape dots so that they are not recognized as class selectors
const elementId = element.id.replace(/\./g, "\\.");

const noElement = document.getElementById(elementId + "_no") as HTMLInputElement;
const noElement = document.getElementById(element.id + "_no") as HTMLInputElement;
noElement.disabled = !enable;

const neverElement = document.getElementById(elementId + "_never") as HTMLInputElement;
const neverElement = document.getElementById(element.id + "_never") as HTMLInputElement;
if (neverElement) {
neverElement.disabled = !enable;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
],
pip: '{$instruction[pip]}',
runStandalone: {$instruction[runStandalone]|intval},
value: '{$instruction[value]|encodeJS}'
value: '{unsafe:$instruction[value]|encodeJS}'
}
{/implode}
{/if}
Expand Down
4 changes: 2 additions & 2 deletions wcfsetup/install/files/acp/templates/articleAdd.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<div class="contentHeaderTitle">
<h1 class="contentTitle">{if $action == 'add'}{lang}wcf.acp.article.add{/lang}{else}{lang}wcf.acp.article.edit{/lang}{/if}</h1>
</div>

<nav class="contentHeaderNavigation">
<ul>
{if $action == 'edit'}
<li>
{unsafe:$interactionContextMenu->render()}
</li>
{/if}

{event name='contentHeaderNavigation'}
</ul>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<td class="columnID">{$logEntry->getObjectID()}</td>
<td class="columnText">{if $logEntry->getLanguage()}{$logEntry->getLanguage()}{else}{$logEntry->languageID}{/if}</td>
<td class="columnText">{$logEntry->languageItem}</td>
<td class="columnDate">{@$logEntry->lastTime|time}</td>
<td class="columnDate">{time time=$logEntry->lastTime}</td>
</tr>
{/foreach}
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/acp/templates/optionFieldList.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</label>
{/if}
</dt>
<dd>{@$optionData[html]}
<dd>{unsafe:$optionData[html]}
{if $error}
<small class="innerError">
{if $error == 'empty'}
Expand Down
6 changes: 3 additions & 3 deletions wcfsetup/install/files/acp/templates/package.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
</dl>
<dl>
<dt>{lang}wcf.acp.package.packageDate{/lang}</dt>
<dd>{@$package->packageDate|date}</dd>
<dd>{time time=$package->packageDate type='plainDate'}</dd>
</dl>
<dl>
<dt>{lang}wcf.acp.package.installDate{/lang}</dt>
<dd>{@$package->installDate|time}</dd>
<dd>{time time=$package->installDate}</dd>
</dl>
<dl>
<dt>{lang}wcf.acp.package.updateDate{/lang}</dt>
<dd>{@$package->updateDate|time}</dd>
<dd>{time time=$package->updateDate}</dd>
</dl>
{if $package->packageURL != ''}
<dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</nav>
</header>

{@$form->getHtml()}
{unsafe:$form->getHtml()}

{include file='footer'}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<ul class="nativeList">
{foreach from=$issues item='issue'}
<li>
<strong>{@$issue['title']}</strong><br>
{@$issue['description']}
<strong>{unsafe:$issue['title']}</strong><br>
{unsafe:$issue['description']}
</li>
{/foreach}
</ul>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{capture assign='pageTitle'}{lang}wcf.acp.package.{@$queue->action}.title{/lang}: {$archive->getLocalizedPackageInfo('packageName')}{/capture}
{capture assign='pageTitle'}{lang}wcf.acp.package.{$queue->action}.title{/lang}: {$archive->getLocalizedPackageInfo('packageName')}{/capture}
{include file='header'}

<script data-relocate="true">
Expand All @@ -10,15 +10,15 @@
'wcf.acp.package.update.title': '{jslang}wcf.acp.package.update.title{/jslang}'
});

new WCF.ACP.Package.Installation({@$queue->queueID}, undefined, {if $queue->action == 'install'}{if $queue->isApplication}false{else}true{/if}, false{else}false, true{/if});
new WCF.ACP.Package.Installation({$queue->queueID}, undefined, {if $queue->action == 'install'}{if $queue->isApplication}false{else}true{/if}, false{else}false, true{/if});

new WCF.ACP.Package.Installation.Cancel({@$queue->queueID});
new WCF.ACP.Package.Installation.Cancel({$queue->queueID});
});
</script>

<header class="contentHeader">
<div class="contentHeaderTitle">
<h1 class="contentTitle">{lang}wcf.acp.package.{@$queue->action}.title{/lang}: {$archive->getLocalizedPackageInfo('packageName')}</h1>
<h1 class="contentTitle">{lang}wcf.acp.package.{$queue->action}.title{/lang}: {$archive->getLocalizedPackageInfo('packageName')}</h1>
<p class="contentHeaderDescription">{$archive->getLocalizedPackageInfo('packageDescription')}</p>
</div>
</header>
Expand Down Expand Up @@ -46,7 +46,7 @@

<dl>
<dt>{lang}wcf.acp.package.packageDate{/lang}</dt>
<dd>{@$archive->getPackageInfo('date')|date}</dd>
<dd>{time time=$archive->getPackageInfo('date') type='plainDate'}</dd>
</dl>

{if $archive->getPackageInfo('packageURL') != ''}
Expand Down Expand Up @@ -82,7 +82,7 @@
{foreach from=$packageValidationArchives item=packageValidationArchive}
{assign var=exceptionMessage value=$packageValidationArchive->getExceptionMessage()}
<tr>
<td class="columnTitle columnPackageName"><span{if $packageValidationArchive->getDepth()} style="padding-left: {@$packageValidationArchive->getDepth() * 14}px"{/if}>{$packageValidationArchive->getArchive()->getLocalizedPackageInfo('packageName')}</span></td>
<td class="columnTitle columnPackageName"><span{if $packageValidationArchive->getDepth()} style="padding-left: {$packageValidationArchive->getDepth() * 14}px"{/if}>{$packageValidationArchive->getArchive()->getLocalizedPackageInfo('packageName')}</span></td>
<td class="columnText columnPackage">{$packageValidationArchive->getArchive()->getPackageInfo('name')}</td>
<td class="columnIcon columnStatus">
{if $exceptionMessage}
Expand All @@ -95,7 +95,7 @@

{if $exceptionMessage}
<tr>
<td colspan="3"><span{if $packageValidationArchive->getDepth()} style="padding-left: {@$packageValidationArchive->getDepth() * 14}px"{/if}>{@$exceptionMessage}</span></td>
<td colspan="3"><span{if $packageValidationArchive->getDepth()} style="padding-left: {$packageValidationArchive->getDepth() * 14}px"{/if}>{unsafe:$exceptionMessage}</span></td>
</tr>
{/if}
{/foreach}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$(function() {
WCF.Language.add('wcf.acp.package.install.title', '{jslang}wcf.acp.package.install.title{/jslang}');

var $installation = new WCF.ACP.Package.Installation({@$queueID});
var $installation = new WCF.ACP.Package.Installation({$queueID});
$installation.prepareInstallation();
});
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</span>

<div>
<h1 class="contentTitle">{lang}wcf.acp.package.{@$installationType}.title{/lang}</h1>
<p id="packageInstallationAction">{lang}wcf.acp.package.{@$installationType}.step.prepare{/lang}</span></p>
<h1 class="contentTitle">{lang}wcf.acp.package.{$installationType}.title{/lang}</h1>
<p id="packageInstallationAction">{lang}wcf.acp.package.{$installationType}.step.prepare{/lang}</span></p>
<small><progress id="packageInstallationProgress" value="0" max="100">0%</progress> <span id="packageInstallationProgressLabel">0%</span></small>
</div>
</header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<div class="packageSearchDescription small">{$package->packageDescription}</div>
<span class="packageSearchPackage small">{$package->package}</span>
{if $package->pluginStoreFileID}
<span class="packageSearchPluginStorePage separatorLeft small"><a href="https://pluginstore.woltlab.com/file/{@$package->pluginStoreFileID}/" class="externalURL jsTooltip" title="{lang}wcf.acp.package.pluginStore.file.link{/lang}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank" rel="noopener"{/if}>{lang}wcf.acp.package.pluginStore.file{/lang}</a></span>
<span class="packageSearchPluginStorePage separatorLeft small"><a href="https://pluginstore.woltlab.com/file/{$package->pluginStoreFileID}/" class="externalURL jsTooltip" title="{lang}wcf.acp.package.pluginStore.file.link{/lang}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank" rel="noopener"{/if}>{lang}wcf.acp.package.pluginStore.file{/lang}</a></span>
{/if}
</td>
<td class="columnText small packageSearchAuthor{if $package->getUpdateServer()->isWoltLabUpdateServer()} packageSearchAuthorWoltlab{/if}" title="{$package->author}">{if $package->authorURL}<a href="{$package->authorURL}" class="externalURL"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank" rel="noopener"{/if}>{$package->author|truncate:30}</a>{else}{$package->author|truncate:30}{/if}</td>
<td class="columnText small packageSearchLicense" title="{$package->getAccessibleVersion()->license}">{if $package->getAccessibleVersion()->licenseURL}<a href="{$package->getAccessibleVersion()->licenseURL}" class="externalURL"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank" rel="noopener"{/if}>{$package->getAccessibleVersion()->license|truncate:30}</a>{else}{$package->getAccessibleVersion()->license|truncate:30}{/if}</td>
<td class="columnDate packageSearchDate">{@$package->getAccessibleVersion()->packageDate|time}</td>
<td class="columnDate packageSearchDate">{time time=$package->getAccessibleVersion()->packageDate}</td>
</tr>
{/foreach}
4 changes: 2 additions & 2 deletions wcfsetup/install/files/acp/templates/packageStartInstall.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<header class="contentHeader">
<div class="contentHeaderTitle">
<h1 class="contentTitle">{lang}{@$pageTitle}{/lang}</h1>
<h1 class="contentTitle">{lang}{$pageTitle}{/lang}</h1>
</div>

<nav class="contentHeaderNavigation">
Expand Down Expand Up @@ -112,7 +112,7 @@
{if $errorType == 'empty'}
{lang}wcf.global.form.error.empty{/lang}
{else}
{lang}wcf.acp.package.error.{@$errorType}{/lang}
{lang}wcf.acp.package.error.{$errorType}{/lang}
{/if}
</small>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{elseif $errorType[duplicate]|isset}
{lang}wcf.acp.updateServer.serverURL.error.duplicate{/lang}
{else}
{lang}wcf.acp.updateServer.serverURL.error.{@$errorType}{/lang}
{lang}wcf.acp.updateServer.serverURL.error.{$errorType}{/lang}
{/if}
</small>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/acp/templates/permissionDenied.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{if ENABLE_DEBUG_MODE}
<!--
{$name} thrown in {$file} ({@$line})
{$name} thrown in {$file} ({$line})
Stacktrace:
{$stacktrace}
-->
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/acp/templates/reauthentication.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</div>
</header>

{@$form->getHtml()}
{unsafe:$form->getHtml()}

{include file='footer'}
8 changes: 4 additions & 4 deletions wcfsetup/install/files/acp/templates/userAdd.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@
new PasswordStrength(elById('password'), {
relatedInputs: relatedInputs,
staticDictionary: [
'{$__wcf->user->username|encodeJS}',
'{$__wcf->user->email|encodeJS}',
'{unsafe:$__wcf->user->username|encodeJS}',
'{unsafe:$__wcf->user->email|encodeJS}',
{if $user|isset}
'{$user->username|encodeJS}',
'{$user->email|encodeJS}',
'{unsafe:$user->username|encodeJS}',
'{unsafe:$user->email|encodeJS}',
{/if}
]
});
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/acp/templates/userException.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{$stacktrace}
-->
<script>
console.debug('{$name|encodeJS} thrown in {$file|encodeJS} ({$line})');
console.debug('{unsafe:$name|encodeJS} thrown in {unsafe:$file|encodeJS} ({$line})');
console.debug('Stacktrace:\n{unsafe:$stacktrace|encodeJS}');
</script>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/acp/templates/userGroupAdd.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
input.disabled = true;
});

var permissions = [{implode from=$ownerGroupPermissions item=$_ownerPermission}'{$_ownerPermission|encodeJS}'{/implode}];
var permissions = [{implode from=$ownerGroupPermissions item=$_ownerPermission}'{unsafe:$_ownerPermission|encodeJS}'{/implode}];
permissions.forEach(function(permission) {
elBySelAll('input[name="values[' + permission + ']"]', undefined, function (input) {
if (input.value === '1') {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.