Skip to content

Commit

Permalink
Escaping user input
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy-1 committed Mar 10, 2019
1 parent e5e0810 commit d201482
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,13 @@
{if $licenseUrl}
{if $ccLicenseBadge}
{if $copyrightHolder}
<p>{translate key="submission.copyrightStatement" copyrightHolder=$copyrightHolder copyrightYear=$copyrightYear}</p>
<p>{translate key="submission.copyrightStatement" copyrightHolder=$copyrightHolder|escape copyrightYear=$copyrightYear|escape}</p>
{/if}
{$ccLicenseBadge}
{else}
<a href="{$licenseUrl|escape}" class="copyright">
{if $copyrightHolder}
{translate key="submission.copyrightStatement" copyrightHolder=$copyrightHolder copyrightYear=$copyrightYear}
{translate key="submission.copyrightStatement" copyrightHolder=$copyrightHolder|escape copyrightYear=$copyrightYear|escape}
{else}
{translate key="submission.license"}
{/if}
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/objects/issue_toc.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{strip}
<h{if $requestedOp === "issue"}1{else}2{/if} class="issue__title">
{if $issue->getShowVolume() || $issue->getShowNumber()}
{if $issue->getShowVolume()|escape}
{if $issue->getShowVolume()}
<span class="issue__volume">{translate key="issue.volume"} {$issue->getVolume()|escape}{if $issue->getShowNumber()}, {/if}</span>
{/if}
{if $issue->getShowNumber()}
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/pages/announcement.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @uses $announcement Announcement The announcement to display
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$announcement->getLocalizedTitle()}
{include file="frontend/components/header.tpl" pageTitleTranslated=$announcement->getLocalizedTitle()|escape}

<main class="container main__content" id="immersion_content_main">
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/pages/issue.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @uses $issueGalleys array Galleys for the entire issue
* @uses $primaryGenreIds array List of file genre IDs for primary types
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$issueIdentification}
{include file="frontend/components/header.tpl" pageTitleTranslated=$issueIdentification|escape}

<main id="immersion_content_main">
<section class="issue{if !$issue} issue__empty{/if}">
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/pages/navigationMenuItemViewContent.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Display NavigationMenuItem content
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$title}
{include file="frontend/components/header.tpl" pageTitleTranslated=$title|escape}

<main class="container main__content" id="immersion_content_main">
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/pages/privacy.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</h1>
</header>
<div class="content-body">
{$currentContext->getLocalizedSetting('privacyStatement')}
{$privacyStatement}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/plugins/generic/htmlArticleGalley/display.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*}
<!DOCTYPE html>
<html lang="{$currentLocale|replace:"_":"-"}" xml:lang="{$currentLocale|replace:"_":"-"}">
{translate|assign:"pageTitleTranslated" key="article.pageTitle" title=$article->getLocalizedTitle()}
{translate|assign:"pageTitleTranslated" key="article.pageTitle" title=$article->getLocalizedTitle()|escape}
{include file="frontend/components/headerHead.tpl"}
<body class="pkp_page_{$requestedPage|escape} pkp_op_{$requestedOp|escape}">

Expand Down
4 changes: 2 additions & 2 deletions templates/plugins/generic/pdfJsViewer/templates/display.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$defaultCharset|escape}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{translate key="article.pageTitle" title=$title}</title>
<title>{translate key="article.pageTitle" title=$title|escape}</title>

{load_header context="frontend" headers=$headers}
{load_stylesheet context="frontend" stylesheets=$stylesheets}
Expand All @@ -43,7 +43,7 @@
{translate key="article.return"}
{/if}
</span>
{$title}
{$title|escape}
</a>
</div>
<div class="pdf-download-button">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Display Static Page content
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$title}
{include file="frontend/components/header.tpl" pageTitleTranslated=$title|escape}

<main class="container main__content">
<div class="row">
Expand Down

0 comments on commit d201482

Please sign in to comment.