Skip to content

Commit

Permalink
pkp#10135 add htmlspecialchars_decode for publication title and subti…
Browse files Browse the repository at this point in the history
…tle in text format
  • Loading branch information
bozana committed Jul 12, 2024
1 parent f118743 commit d11f574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/publication/PKPPublication.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function getLocalizedTitle($preferredLocale = null, string $format = 'tex
break;
case 'text':
// Title is in HTML, prefix is already in text. Convert title.
$title = strip_tags($title);
$title = htmlspecialchars_decode(strip_tags($title));
break;
default: throw new \Exception('Invalid format!');
}
Expand All @@ -126,7 +126,7 @@ public function getLocalizedSubTitle($preferredLocale = null, string $format = '
$subTitle = $this->getLocalizedData('subtitle', $preferredLocale);

if ($subTitle) {
return strtolower($format) === 'text' ? strip_tags($subTitle) : $subTitle;
return strtolower($format) === 'text' ? htmlspecialchars_decode(strip_tags($subTitle)) : $subTitle;
}

return '';
Expand Down

0 comments on commit d11f574

Please sign in to comment.