Skip to content

Commit

Permalink
pkp/pkp-lib#2564 Update tag configs for HTML title and use of PKPPubl…
Browse files Browse the repository at this point in the history
…ication::********Title()
  • Loading branch information
touhidurabir committed Feb 15, 2023
1 parent f5de50a commit ea10661
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.TEMPLATE.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@

; Allowed HTML tags for submission titles only
; Unspecified attributes will be stripped.
allowed_title_html = "strong,em,b,sup,sub"
allowed_title_html = "b,i,u,sup,sub"

;N.b.: The implicit_auth parameter has been removed in favor of plugin implementations such as shibboleth

Expand Down
2 changes: 1 addition & 1 deletion plugins/generic/htmlArticleGalley/templates/display.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{url page="article" op="download" path=$article->getBestId()|to_array:$galley->getBestGalleyId():$submissionFile->getId() inline=true}
{/capture}
{/if}
<iframe name="htmlFrame" src="{$htmlUrl}" title="{translate key="submission.representationOfTitle" representation=$galley->getLabel() title=$galleyPublication->getLocalizedFullTitle()|escape}" allowfullscreen webkitallowfullscreen></iframe>
<iframe name="htmlFrame" src="{$htmlUrl}" title="{translate key="submission.representationOfTitle" representation=$galley->getLabel() title=$galleyPublication->getLocalizedFullTitle(null, 'html')|unescape:'html'}" allowfullscreen webkitallowfullscreen></iframe>
</div>
{call_hook name="Templates::Common::Footer::PageFooter"}
</body>
Expand Down
2 changes: 1 addition & 1 deletion plugins/importexport/doaj/filter/DOAJJsonFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function &process(&$pubObject)
}

// Article title
$article['bibjson']['title'] = strip_tags($pubObject->getTitle($pubObject->getLocale()));
$article['bibjson']['title'] = $pubObject?->getCurrentPublication()?->getLocalizedTitle($pubObject->getLocale(), 'html') ?? '';
// Identifiers
$article['bibjson']['identifier'] = [];
// DOI
Expand Down
2 changes: 1 addition & 1 deletion plugins/importexport/doaj/filter/DOAJXmlFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function &process(&$pubObjects)
}
foreach ($articleTitles as $locale => $title) {
if (!empty($title)) {
$recordNode->appendChild($node = $doc->createElement('title', htmlspecialchars(strip_tags($title), ENT_COMPAT, 'UTF-8')));
$recordNode->appendChild($node = $doc->createElement('title', htmlspecialchars($title, ENT_COMPAT, 'UTF-8')));
$node->setAttribute('language', LocaleConversion::get3LetterIsoFromLocale($locale));
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/reports/articles/ArticleReportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function display($args, $request)
// Store the submission results
$results[] = [
'submissionId' => $submission->getId(),
'title' => $publication->getLocalizedFullTitle(),
'title' => htmlspecialchars($publication->getLocalizedFullTitle(null, 'html')),
'abstract' => html_entity_decode(strip_tags($publication->getLocalizedData('abstract'))),
'authors' => array_map(function ($author) {
return [
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/pages/article.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @uses $primaryGalleys array List of article galleys that are not supplementary or dependent
* @uses $supplementaryGalleys array List of article galleys that are supplementary
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$article->getLocalizedFullTitle()|escape}
{include file="frontend/components/header.tpl" pageTitleTranslated=$article->getLocalizedFullTitle(null, 'html')|unescape:'html'}

<div class="page page_article">
{if $section}
Expand Down

0 comments on commit ea10661

Please sign in to comment.