33*}
44
55<script data-cfasync =" false" >
6- var WCF_PATH = ' { @ $__wcf -> getPath ()} ' ;
7- var WSC_API_URL = ' { @ $__wcf -> getPath ()} ' ;
6+ var WCF_PATH = ' { unsafe: $__wcf -> getPath ()|encodeJS } ' ;
7+ var WSC_API_URL = ' { unsafe: $__wcf -> getPath ()|encodeJS } ' ;
88 var WSC_RPC_API_URL = ' { link controller= " Api" id= " rpc" } { /link} ' ;
99 { * The SECURITY_TOKEN is defined in wcf.globalHelper.js *}
10- var LANGUAGE_ID = { @ $__wcf -> getLanguage ()-> languageID } ;
10+ var LANGUAGE_ID = { $__wcf -> getLanguage ()-> languageID } ;
1111 var LANGUAGE_USE_INFORMAL_VARIANT = { if LANGUAGE_USE_INFORMAL_VARIANT} true { else } false { /if } ;
12- var TIME_NOW = { @ TIME_NOW} ;
13- var LAST_UPDATE_TIME = { @ LAST_UPDATE_TIME} ;
12+ var TIME_NOW = { TIME_NOW} ;
13+ var LAST_UPDATE_TIME = { LAST_UPDATE_TIME} ;
1414 var ENABLE_DEBUG_MODE = { if ENABLE_DEBUG_MODE} true { else } false { /if } ;
1515 var ENABLE_PRODUCTION_DEBUG_MODE = { if ENABLE_PRODUCTION_DEBUG_MODE} true { else } false { /if } ;
1616 var ENABLE_DEVELOPER_TOOLS = { if ENABLE_DEVELOPER_TOOLS} true { else } false { /if } ;
17- var PAGE_TITLE = ' { PAGE_TITLE|phrase|encodeJS} ' ;
17+ var PAGE_TITLE = ' { unsafe: PAGE_TITLE|phrase|encodeJS} ' ;
1818
19- var REACTION_TYPES = { @ $__wcf -> getReactionHandler ()-> getReactionsJSVariable ()} ;
19+ var REACTION_TYPES = { unsafe: $__wcf -> getReactionHandler ()-> getReactionsJSVariable ()} ;
2020
2121 { if ENABLE_DEBUG_MODE}
2222 { * This constant is a compiler option, it does not exist in production. *}
3131 { /if }
3232 </script >
3333
34- <script data-cfasync =" false" src =" { $__wcf -> getPath ()} js/WoltLabSuite/WebComponent.min.js?v={ @ LAST_UPDATE_TIME} " ></script >
34+ <script data-cfasync =" false" src =" { $__wcf -> getPath ()} js/WoltLabSuite/WebComponent.min.js?v={ LAST_UPDATE_TIME} " ></script >
3535<script data-cfasync =" false" src =" { $phrasePreloader -> getUrl ($__wcf -> language )} " ></script >
3636
3737{ js application= ' wcf' file= ' require' bundle= ' WoltLabSuite.Core' core= ' true' hasTiny= true }
4141{ js application= ' wcf' file= ' 3rdParty/tslib' bundle= ' WoltLabSuite.Core' core= ' true' hasTiny= true }
4242<script data-cfasync =" false" >
4343requirejs .config ({
44- baseUrl: ' { @ $__wcf -> getPath ()} js' ,
45- urlArgs: ' t={ @ LAST_UPDATE_TIME} '
44+ baseUrl: ' { unsafe: $__wcf -> getPath ()|encodeJS } js' ,
45+ urlArgs: ' t={ LAST_UPDATE_TIME} '
4646 { hascontent}
4747 , paths: {
4848 { content} { event name= ' requirePaths' } { /content}
@@ -66,9 +66,9 @@ window.addEventListener('pageshow', function(event) {
6666 { /hascontent}
6767
6868 User.init(
69- { @ $__wcf -> user -> userID } ,
70- { if $__wcf -> user -> userID } ' { @ $__wcf -> user -> username |encodeJS} ' { else } ' ' { /if } ,
71- { if $__wcf -> user -> userID } ' { @ $__wcf -> user -> getLink ()|encodeJS} ' { else } ' ' { /if } ,
69+ { $__wcf -> user -> userID } ,
70+ { if $__wcf -> user -> userID } ' { unsafe: $__wcf -> user -> username |encodeJS} ' { else } ' ' { /if } ,
71+ { if $__wcf -> user -> userID } ' { unsafe: $__wcf -> user -> getLink ()|encodeJS} ' { else } ' ' { /if } ,
7272 ' { link controller= ' GuestTokenDialog' } { /link} '
7373 );
7474
@@ -79,7 +79,7 @@ window.addEventListener('pageshow', function(event) {
7979 } ,
8080 { if $__wcf -> user -> userID && SERVICE_WORKER_PUBLIC_KEY !== ' ' }
8181 serviceWorker: {
82- publicKey: ' { @ SERVICE_WORKER_PUBLIC_KEY|encodeJS} ' ,
82+ publicKey: ' { unsafe: SERVICE_WORKER_PUBLIC_KEY|encodeJS} ' ,
8383 serviceWorkerJsUrl: ' { $__wcf -> getPath (' wcf' )} service-worker/' ,
8484 registerUrl: ' { link controller= " RegisterServiceWorker" } { /link} ' ,
8585 notificationLastReadTime: { $__wcf -> getUserNotificationHandler ()-> getTimeOfLastReadNotification ()}
@@ -137,8 +137,8 @@ window.addEventListener('pageshow', function(event) {
137137
138138<script data-relocate =" true" >
139139 WCF .User .init (
140- { @ $__wcf -> user -> userID } ,
141- { if $__wcf -> user -> userID } ' { @ $__wcf -> user -> username |encodeJS} ' { else } ' ' { /if }
140+ { $__wcf -> user -> userID } ,
141+ { if $__wcf -> user -> userID } ' { unsafe: $__wcf -> user -> username |encodeJS} ' { else } ' ' { /if }
142142 );
143143 </script >
144144
0 commit comments