summaryrefslogtreecommitdiff
path: root/app/Controller/IndividualController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/IndividualController.php')
-rw-r--r--app/Controller/IndividualController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Controller/IndividualController.php b/app/Controller/IndividualController.php
index dc45e2aabe..7bb255acc5 100644
--- a/app/Controller/IndividualController.php
+++ b/app/Controller/IndividualController.php
@@ -24,6 +24,7 @@ use Fisharebest\Webtrees\Functions\FunctionsPrint;
use Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
use Fisharebest\Webtrees\GedcomCode\GedcomCodeName;
use Fisharebest\Webtrees\GedcomTag;
+use Fisharebest\Webtrees\Html;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Individual;
use Fisharebest\Webtrees\Menu;
@@ -159,7 +160,7 @@ class IndividualController extends GedcomRecordController {
echo '<dt class="label">', GedcomTag::getLabel($tag, $this->record), '</dt>';
echo '<dd class="field">'; // Before using dir="auto" on this field, note that Gecko treats this as an inline element but WebKit treats it as a block element
if (isset($nmatch[$i][2])) {
- $name = Filter::escapeHtml($nmatch[$i][2]);
+ $name = Html::escape($nmatch[$i][2]);
$name = str_replace('/', '', $name);
$name = preg_replace('/(\S*)\*/', '<span class="starredname">\\1</span>', $name);
switch ($tag) {
@@ -169,7 +170,7 @@ class IndividualController extends GedcomRecordController {
case 'SURN':
// The SURN field is not necessarily the surname.
// Where it is not a substring of the real surname, show it after the real surname.
- $surname = Filter::escapeHtml($dummy->getAllNames()[0]['surname']);
+ $surname = Html::escape($dummy->getAllNames()[0]['surname']);
if (strpos($dummy->getAllNames()[0]['surname'], str_replace(',', ' ', $nmatch[$i][2])) !== false) {
echo '<span dir="auto">' . $surname . '</span>';
} else {