From: Tim Düsterhus Date: Thu, 20 Jan 2022 10:50:19 +0000 (+0100) Subject: Stop using `|encodeJSON` X-Git-Tag: 5.5.0_Alpha_1~200^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab1e34de9ca94dc44b20d0b4d58eca2bad80d9d3;p=GitHub%2FWoltLab%2FWCF.git Stop using `|encodeJSON` --- diff --git a/com.woltlab.wcf/templates/ampArticle.tpl b/com.woltlab.wcf/templates/ampArticle.tpl index dff8476419..5c6d786804 100644 --- a/com.woltlab.wcf/templates/ampArticle.tpl +++ b/com.woltlab.wcf/templates/ampArticle.tpl @@ -9,21 +9,21 @@ { "@context": "http://schema.org", "@type": "NewsArticle", - "mainEntityOfPage": "{@$regularCanonicalURL|encodeJSON}", - "headline": "{@$articleContent->title|encodeJSON}", + "mainEntityOfPage": {@$regularCanonicalURL|json}, + "headline": {@$articleContent->title|json}, "datePublished": "{@$article->time|date:'c'}", "dateModified": "{@$article->time|date:'c'}", - "description": "{@$articleContent->getFormattedTeaser()|encodeJSON}", + "description": {@$articleContent->getFormattedTeaser()|json}, "author": { "@type": "Person", - "name": "{@$article->username|encodeJSON}" + "name": {@$article->username|json} }, "publisher": { "@type": "Organization", "name": "{PAGE_TITLE|language}", "logo": { "@type": "ImageObject", - "url": "{@$__wcf->getStyleHandler()->getStyle()->getPageLogo()|encodeJSON}", + "url": {@$__wcf->getStyleHandler()->getStyle()->getPageLogo()|json}, "width": {@$__wcf->getStyleHandler()->getStyle()->getVariable('pageLogoWidth')}, "height": {@$__wcf->getStyleHandler()->getStyle()->getVariable('pageLogoHeight')} } @@ -31,7 +31,7 @@ {if $articleContent->getImage()} ,"image": { "@type": "ImageObject", - "url": "{@$articleContent->getImage()->getThumbnailLink('large')|encodeJSON}", + "url": {@$articleContent->getImage()->getThumbnailLink('large')|json}, "width": {@$articleContent->getImage()->getThumbnailWidth('large')}, "height": {@$articleContent->getImage()->getThumbnailHeight('large')} } diff --git a/com.woltlab.wcf/templates/headIncludeJsonLd.tpl b/com.woltlab.wcf/templates/headIncludeJsonLd.tpl index 7c66ef34fd..48931de3d5 100644 --- a/com.woltlab.wcf/templates/headIncludeJsonLd.tpl +++ b/com.woltlab.wcf/templates/headIncludeJsonLd.tpl @@ -4,10 +4,10 @@ { "@context": "http://schema.org", "@type": "WebSite", -"url": "{@$__websiteUrl|encodeJSON}", +"url": {@$__websiteUrl|json}, "potentialAction": { "@type": "SearchAction", -"target": "{@$__searchTargetUrl|encodeJSON}", +"target": {@$__searchTargetUrl|json}, "query-input": "required name=search_term_string" } }