summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin_media.php12
-rw-r--r--admin_trees_duplicates.php2
-rw-r--r--admin_trees_unconnected.php2
-rw-r--r--app/CommonMark/XrefParser.php2
-rw-r--r--app/Controller/AncestryController.php2
-rw-r--r--app/Controller/BranchesController.php10
-rw-r--r--app/Controller/DescendancyController.php2
-rw-r--r--app/Controller/FanchartController.php2
-rw-r--r--app/Controller/LifespanController.php2
-rw-r--r--app/Controller/SearchController.php12
-rw-r--r--app/Controller/TimelineController.php2
-rw-r--r--app/Functions/FunctionsCharts.php2
-rw-r--r--app/Functions/FunctionsPrint.php2
-rw-r--r--app/Functions/FunctionsPrintFacts.php32
-rw-r--r--app/Functions/FunctionsPrintLists.php22
-rw-r--r--app/GedcomRecord.php18
-rw-r--r--app/Http/Controllers/AdminController.php16
-rw-r--r--app/Http/Controllers/EditMediaController.php8
-rw-r--r--app/Http/Controllers/EditNoteController.php2
-rw-r--r--app/Http/Controllers/EditRepositoryController.php2
-rw-r--r--app/Http/Controllers/EditSourceController.php2
-rw-r--r--app/Http/Controllers/EditSubmitterController.php2
-rw-r--r--app/Module/BatchUpdateModule.php2
-rw-r--r--app/Module/ClippingsCart/ClippingsCartController.php4
-rw-r--r--app/Module/ClippingsCartModule.php4
-rw-r--r--app/Module/DescendancyModule.php6
-rw-r--r--app/Module/FamiliesSidebarModule.php4
-rw-r--r--app/Module/FamilyNavigatorModule.php8
-rw-r--r--app/Module/GoogleMapsModule.php10
-rw-r--r--app/Module/IndividualSidebarModule.php4
-rw-r--r--app/Module/InteractiveTree/TreeView.php4
-rw-r--r--app/Module/LoggedInUsersModule.php2
-rw-r--r--app/Module/RecentChangesModule.php8
-rw-r--r--app/Module/RelativesTabModule.php2
-rw-r--r--app/Module/ReviewChangesModule.php2
-rw-r--r--app/Module/SiteMapModule.php2
-rw-r--r--app/Module/StoriesModule.php4
-rw-r--r--app/Module/TopPageViewsModule.php2
-rw-r--r--app/Module/UserWelcomeModule.php2
-rw-r--r--app/Module/WelcomeBlockModule.php2
-rw-r--r--app/Stats.php60
-rw-r--r--app/Theme/AbstractTheme.php14
-rw-r--r--calendar.php2
-rw-r--r--edit_changes.php4
-rw-r--r--edit_interface.php82
-rw-r--r--gedrecord.php2
-rw-r--r--individual.php2
-rw-r--r--medialist.php8
-rw-r--r--resources/views/admin/merge-records-step-2.php10
-rw-r--r--resources/views/admin/tree-privacy.php2
-rw-r--r--resources/views/blocks/research-tasks.php2
-rw-r--r--resources/views/blocks/slide-show.php8
-rw-r--r--resources/views/blocks/yahrzeit-list.php2
-rw-r--r--resources/views/blocks/yahrzeit-table.php2
-rw-r--r--resources/views/compact-chart-individual.php2
-rw-r--r--resources/views/tabs/album.php2
-rw-r--r--timeline.php2
57 files changed, 219 insertions, 217 deletions
diff --git a/admin_media.php b/admin_media.php
index f61981bf7b..b9376b7c24 100644
--- a/admin_media.php
+++ b/admin_media.php
@@ -519,25 +519,25 @@ function mediaFileInfo($media_folder, $media_path, $file) {
* @return string HTML
*/
function mediaObjectInfo(Media $media) {
- $html = '<b><a href="' . $media->getHtmlUrl() . '">' . $media->getFullName() . '</a></b>' . '<br><i>' . Html::escape($media->getNote()) . '</i></br><br>';
+ $html = '<b><a href="' . e($media->url()) . '">' . $media->getFullName() . '</a></b>' . '<br><i>' . Html::escape($media->getNote()) . '</i></br><br>';
$linked = [];
foreach ($media->linkedIndividuals('OBJE') as $link) {
- $linked[] = '<a href="' . $link->getHtmlUrl() . '">' . $link->getFullName() . '</a>';
+ $linked[] = '<a href="' . e($link->url()) . '">' . $link->getFullName() . '</a>';
}
foreach ($media->linkedFamilies('OBJE') as $link) {
- $linked[] = '<a href="' . $link->getHtmlUrl() . '">' . $link->getFullName() . '</a>';
+ $linked[] = '<a href="' . e($link->url()) . '">' . $link->getFullName() . '</a>';
}
foreach ($media->linkedSources('OBJE') as $link) {
- $linked[] = '<a href="' . $link->getHtmlUrl() . '">' . $link->getFullName() . '</a>';
+ $linked[] = '<a href="' . e($link->url()) . '">' . $link->getFullName() . '</a>';
}
foreach ($media->linkedNotes('OBJE') as $link) {
// Invalid GEDCOM - you cannot link a NOTE to an OBJE
- $linked[] = '<a href="' . $link->getHtmlUrl() . '">' . $link->getFullName() . '</a>';
+ $linked[] = '<a href="' . e($link->url()) . '">' . $link->getFullName() . '</a>';
}
foreach ($media->linkedRepositories('OBJE') as $link) {
// Invalid GEDCOM - you cannot link a REPO to an OBJE
- $linked[] = '<a href="' . $link->getHtmlUrl() . '">' . $link->getFullName() . '</a>';
+ $linked[] = '<a href="' . e($link->url()) . '">' . $link->getFullName() . '</a>';
}
if (!empty($linked)) {
$html .= '<ul>';
diff --git a/admin_trees_duplicates.php b/admin_trees_duplicates.php
index 5d93cc2ba3..5734b83149 100644
--- a/admin_trees_duplicates.php
+++ b/admin_trees_duplicates.php
@@ -159,7 +159,7 @@ echo Bootstrap4::breadcrumbs([
<?= $duplicates[0]->getFullName() ?>
<?php foreach ($duplicates as $record): ?>
- <a href="<?= $record->getHtmlUrl() ?>">
+ <a href="<?= e($record->url()) ?>">
<?= $record->getXref() ?>
</a>
<?php endforeach ?>
diff --git a/admin_trees_unconnected.php b/admin_trees_unconnected.php
index 532cb87e3a..21429979e8 100644
--- a/admin_trees_unconnected.php
+++ b/admin_trees_unconnected.php
@@ -95,7 +95,7 @@ echo Bootstrap4::breadcrumbs([
<ul>
<?php foreach ($group as $individual): ?>
<li>
- <a href="<?= $individual->getHtmlUrl() ?>"><?= $individual->getFullName() ?></a>
+ <a href="<?= e($individual->url()) ?>"><?= $individual->getFullName() ?></a>
</li>
<?php endforeach ?>
</ul>
diff --git a/app/CommonMark/XrefParser.php b/app/CommonMark/XrefParser.php
index 9c11621f44..f79e283849 100644
--- a/app/CommonMark/XrefParser.php
+++ b/app/CommonMark/XrefParser.php
@@ -77,7 +77,7 @@ class XrefParser extends AbstractInlineParser {
return false;
}
- $url = $record->getRawUrl();
+ $url = $record->url();
$label = $handle;
$title = strip_tags($record->getFullName());
$context->getContainer()->appendChild(new Link($url, $label, $title));
diff --git a/app/Controller/AncestryController.php b/app/Controller/AncestryController.php
index 89cac81048..85c7b80aac 100644
--- a/app/Controller/AncestryController.php
+++ b/app/Controller/AncestryController.php
@@ -84,7 +84,7 @@ class AncestryController extends ChartController {
echo ' <span class="person_boxF">', I18N::number($sosa * 2 + 1), '</span>';
if ($family->canShow()) {
foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo ' <a href="', $family->getHtmlUrl(), '" class="details1">', $fact->summary(), '</a>';
+ echo ' <a href="', e($family->url()), '" class="details1">', $fact->summary(), '</a>';
}
}
echo '</span>';
diff --git a/app/Controller/BranchesController.php b/app/Controller/BranchesController.php
index 851d4edad2..4f025cce1f 100644
--- a/app/Controller/BranchesController.php
+++ b/app/Controller/BranchesController.php
@@ -219,7 +219,7 @@ class BranchesController extends PageController {
}
// Generate HTML for this individual, and all their descendants
- $indi_html = $individual->getSexImage() . '<a class="' . $sosa_class . '" href="' . $individual->getHtmlUrl() . '">' . $person_name . '</a> ' . $individual->getLifeSpan() . $sosa_html;
+ $indi_html = $individual->getSexImage() . '<a class="' . $sosa_class . '" href="' . e($individual->url()) . '">' . $person_name . '</a> ' . $individual->getLifeSpan() . $sosa_html;
// If this is not a birth pedigree (e.g. an adoption), highlight it
if ($parents) {
@@ -255,13 +255,13 @@ class BranchesController extends PageController {
}
$marriage_year = $family->getMarriageYear();
if ($marriage_year) {
- $fam_html .= ' <a href="' . $family->getHtmlUrl() . '" title="' . strip_tags($family->getMarriageDate()->display()) . '"><i class="icon-rings"></i>' . $marriage_year . '</a>';
+ $fam_html .= ' <a href="' . e($family->url()) . '" title="' . strip_tags($family->getMarriageDate()->display()) . '"><i class="icon-rings"></i>' . $marriage_year . '</a>';
} elseif ($family->getFirstFact('MARR')) {
- $fam_html .= ' <a href="' . $family->getHtmlUrl() . '" title="' . I18N::translate('Marriage') . '"><i class="icon-rings"></i></a>';
+ $fam_html .= ' <a href="' . e($family->url()) . '" title="' . I18N::translate('Marriage') . '"><i class="icon-rings"></i></a>';
} else {
- $fam_html .= ' <a href="' . $family->getHtmlUrl() . '" title="' . I18N::translate('Not married') . '"><i class="icon-rings"></i></a>';
+ $fam_html .= ' <a href="' . e($family->url()) . '" title="' . I18N::translate('Not married') . '"><i class="icon-rings"></i></a>';
}
- $fam_html .= ' ' . $spouse->getSexImage() . '<a class="' . $sosa_class . '" href="' . $spouse->getHtmlUrl() . '">' . $spouse->getFullName() . '</a> ' . $spouse->getLifeSpan() . ' ' . $sosa_html;
+ $fam_html .= ' ' . $spouse->getSexImage() . '<a class="' . $sosa_class . '" href="' . e($spouse->url()) . '">' . $spouse->getFullName() . '</a> ' . $spouse->getLifeSpan() . ' ' . $sosa_html;
}
$fam_html .= '<ol>';
diff --git a/app/Controller/DescendancyController.php b/app/Controller/DescendancyController.php
index 2788a7eb5c..1e271b475d 100644
--- a/app/Controller/DescendancyController.php
+++ b/app/Controller/DescendancyController.php
@@ -165,7 +165,7 @@ class DescendancyController extends ChartController {
echo '<a href="#" onclick="expand_layer(\'' . $uid . '\'); return false;" class="top"><i id="' . $uid . '_img" class="icon-minus" title="' . I18N::translate('View this family') . '"></i></a>';
if ($family->canShow()) {
foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo ' <a href="', $family->getHtmlUrl(), '" class="details1">', $fact->summary(), '</a>';
+ echo ' <a href="', e($family->url()), '" class="details1">', $fact->summary(), '</a>';
}
}
echo '</span>';
diff --git a/app/Controller/FanchartController.php b/app/Controller/FanchartController.php
index ce6086a312..c16cd61039 100644
--- a/app/Controller/FanchartController.php
+++ b/app/Controller/FanchartController.php
@@ -340,7 +340,7 @@ class FanchartController extends ChartController {
$imagemap .= '" href="#' . $pid . '"';
$html .= '<div id="' . $pid . '" class="fan_chart_menu">';
$html .= '<div class="person_box"><div class="details1">';
- $html .= '<a href="' . $person->getHtmlUrl() . '" class="name1">' . $name;
+ $html .= '<a href="' . e($person->url()) . '" class="name1">' . $name;
if ($addname) {
$html .= $addname;
}
diff --git a/app/Controller/LifespanController.php b/app/Controller/LifespanController.php
index 07a778f07f..10e27e31b0 100644
--- a/app/Controller/LifespanController.php
+++ b/app/Controller/LifespanController.php
@@ -443,7 +443,7 @@ class LifespanController extends PageController {
$popupClass, $Y, $direction, $startPos, $width, $color,
$person->getSexImage(), $printName, $abbrLifespan,
$popupClass,
- $person->getHtmlUrl(), $person->getFullName(), $lifespan
+ e($person->url()), $person->getFullName(), $lifespan
);
// Add events to popup
diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php
index 9718a467f7..d88eb5ffb6 100644
--- a/app/Controller/SearchController.php
+++ b/app/Controller/SearchController.php
@@ -175,7 +175,7 @@ class SearchController extends PageController {
if (preg_match('/' . WT_REGEX_XREF . '/', $this->query)) {
$record = GedcomRecord::getInstance($this->query, $this->tree());
if ($record && $record->canShowName()) {
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
exit;
}
}
@@ -266,28 +266,28 @@ class SearchController extends PageController {
if (count($this->myindilist) == 1 && !$this->myfamlist && !$this->mysourcelist && !$this->mynotelist) {
$indi = reset($this->myindilist);
if ($indi->canShowName()) {
- header('Location: ' . $indi->getRawUrl());
+ header('Location: ' . $indi->url());
exit;
}
}
if (!$this->myindilist && count($this->myfamlist) == 1 && !$this->mysourcelist && !$this->mynotelist) {
$fam = reset($this->myfamlist);
if ($fam->canShowName()) {
- header('Location: ' . $fam->getRawUrl());
+ header('Location: ' . $fam->url());
exit;
}
}
if (!$this->myindilist && !$this->myfamlist && count($this->mysourcelist) == 1 && !$this->mynotelist) {
$sour = reset($this->mysourcelist);
if ($sour->canShowName()) {
- header('Location: ' . $sour->getRawUrl());
+ header('Location: ' . $sour->url());
exit;
}
}
if (!$this->myindilist && !$this->myfamlist && !$this->mysourcelist && count($this->mynotelist) == 1) {
$note = reset($this->mynotelist);
if ($note->canShowName()) {
- header('Location: ' . $note->getRawUrl());
+ header('Location: ' . $note->url());
exit;
}
}
@@ -494,7 +494,7 @@ class SearchController extends PageController {
//-- if only 1 item is returned, automatically forward to that item
if (count($this->myindilist) == 1 && $this->action != 'replace') {
$indi = reset($this->myindilist);
- header('Location: ' . $indi->getRawUrl());
+ header('Location: ' . $indi->url());
exit;
}
usort($this->myindilist, '\Fisharebest\Webtrees\GedcomRecord::compare');
diff --git a/app/Controller/TimelineController.php b/app/Controller/TimelineController.php
index 8251965429..16bb55d223 100644
--- a/app/Controller/TimelineController.php
+++ b/app/Controller/TimelineController.php
@@ -239,7 +239,7 @@ class TimelineController extends PageController {
}
// Print spouses names for family events
if ($event->getParent() instanceof Family) {
- echo ' — <a href="', $event->getParent()->getHtmlUrl(), '">', $event->getParent()->getFullName(), '</a>';
+ echo ' — <a href="', e($event->getParent()->url()), '">', $event->getParent()->getFullName(), '</a>';
}
echo '</td></tr></table>';
echo '</div>';
diff --git a/app/Functions/FunctionsCharts.php b/app/Functions/FunctionsCharts.php
index 6435750614..09277ed382 100644
--- a/app/Functions/FunctionsCharts.php
+++ b/app/Functions/FunctionsCharts.php
@@ -165,7 +165,7 @@ class FunctionsCharts {
echo '</tr></table>';
if ($sosa && $family->canShow()) {
foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo '<a href="', $family->getHtmlUrl(), '" class="details1">';
+ echo '<a href="', e($family->url()), '" class="details1">';
echo str_repeat('&nbsp;', 10);
echo $fact->summary();
echo '</a>';
diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php
index 20d490f5b0..08f4fa99ba 100644
--- a/app/Functions/FunctionsPrint.php
+++ b/app/Functions/FunctionsPrint.php
@@ -96,7 +96,7 @@ class FunctionsPrint {
$element_id = Uuid::uuid4();
// NOTE: class "note-details" is (currently) used only by some third-party themes
if ($note) {
- $first_line = '<a href="' . $note->getHtmlUrl() . '">' . $note->getFullName() . '</a>';
+ $first_line = '<a href="' . e($note->url()) . '">' . $note->getFullName() . '</a>';
} else {
list($text) = explode("\n", strip_tags($html));
$first_line = strlen($text) > 100 ? mb_substr($text, 0, 100) . I18N::translate('…') : $text;
diff --git a/app/Functions/FunctionsPrintFacts.php b/app/Functions/FunctionsPrintFacts.php
index e9c513a676..29512f8762 100644
--- a/app/Functions/FunctionsPrintFacts.php
+++ b/app/Functions/FunctionsPrintFacts.php
@@ -206,12 +206,12 @@ class FunctionsPrintFacts {
if ($parent instanceof Family) {
foreach ($parent->getSpouses() as $spouse) {
if ($record !== $spouse) {
- echo '<a href="', $spouse->getHtmlUrl(), '">', $spouse->getFullName(), '</a> — ';
+ echo '<a href="', e($spouse->url()), '">', $spouse->getFullName(), '</a> — ';
}
}
- echo '<a href="', $parent->getHtmlUrl(), '">', I18N::translate('View this family'), '</a><br>';
+ echo '<a href="', e($parent->url()), '">', I18N::translate('View this family'), '</a><br>';
} elseif ($parent instanceof Individual) {
- echo '<a href="', $parent->getHtmlUrl(), '">', $parent->getFullName(), '</a><br>';
+ echo '<a href="', e($parent->url()), '">', $parent->getFullName(), '</a><br>';
}
}
@@ -289,7 +289,7 @@ class FunctionsPrintFacts {
if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $fact->getValue(), $match)) {
$target = GedcomRecord::getInstance($match[1], $fact->getParent()->getTree());
if ($target) {
- echo '<div><a href="', $target->getHtmlUrl(), '">', $target->getFullName(), '</a></div>';
+ echo '<div><a href="', e($target->url()), '">', $target->getFullName(), '</a></div>';
} else {
echo '<div class="error">', Html::escape($fact->getValue()), '</div>';
}
@@ -385,7 +385,7 @@ class FunctionsPrintFacts {
case 'FAMC': // 0 INDI / 1 ADOP / 2 FAMC / 3 ADOP
$family = Family::getInstance(str_replace('@', '', $match[2]), $fact->getParent()->getTree());
if ($family) {
- echo GedcomTag::getLabelValue('FAM', '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a>');
+ echo GedcomTag::getLabelValue('FAM', '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a>');
if (preg_match('/\n3 ADOP (HUSB|WIFE|BOTH)/', $fact->getGedcom(), $match)) {
echo GedcomTag::getLabelValue('ADOP', GedcomCodeAdop::getValue($match[1], $label_person));
}
@@ -443,7 +443,7 @@ class FunctionsPrintFacts {
// Links
$linked_record = GedcomRecord::getInstance($xmatch[1], $fact->getParent()->getTree());
if ($linked_record) {
- $link = '<a href="' . $linked_record->getHtmlUrl() . '">' . $linked_record->getFullName() . '</a>';
+ $link = '<a href="' . e($linked_record->url()) . '">' . $linked_record->getFullName() . '</a>';
echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], $link);
} else {
echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], Html::escape($match[2]));
@@ -500,7 +500,7 @@ class FunctionsPrintFacts {
$label = GedcomTag::getLabel('ASSO', $person);
}
- $values = ['<a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a>'];
+ $values = ['<a href="' . e($person->url()) . '">' . $person->getFullName() . '</a>'];
foreach ($associates as $associate) {
$relationship_name = Functions::getCloseRelationshipName($associate, $person);
if (!$relationship_name) {
@@ -541,7 +541,7 @@ class FunctionsPrintFacts {
$repository = Repository::getInstance($xref, $WT_TREE);
if ($repository && $repository->canShow()) {
- echo '<a class="field" href="', $repository->getHtmlUrl(), '">', $repository->getFullName(), '</a><br>';
+ echo '<a class="field" href="', e($repository->url()), '">', $repository->getFullName(), '</a><br>';
echo '<br>';
echo FunctionsPrint::printFactNotes($repository->getGedcom(), 1);
}
@@ -600,7 +600,7 @@ class FunctionsPrintFacts {
if ($lt > 0) {
$data .= '<a href="#" onclick="return expand_layer(\'' . $elementID . '\');"><i id="' . $elementID . '_img" class="' . $plusminus . '"></i></a> ';
}
- $data .= GedcomTag::getLabelValue('SOUR', '<a href="' . $source->getHtmlUrl() . '">' . $source->getFullName() . '</a>', null, 'span');
+ $data .= GedcomTag::getLabelValue('SOUR', '<a href="' . e($source->url()) . '">' . $source->getFullName() . '</a>', null, 'span');
$data .= '</div>';
$data .= "<div id=\"$elementID\"";
@@ -663,7 +663,7 @@ class FunctionsPrintFacts {
}
echo '</div>';
echo '<div class="media-display-title">';
- echo '<a href="', $media->getHtmlUrl(), '">', $media->getFullName(), '</a>';
+ echo '<a href="', e($media->url()), '">', $media->getFullName(), '</a>';
// NOTE: echo the notes of the media
echo '<p>';
echo FunctionsPrint::printFactNotes($media->getGedcom(), 1);
@@ -678,7 +678,7 @@ class FunctionsPrintFacts {
if ($ct > 0) {
$spouse = Individual::getInstance($match[1], $media->getTree());
if ($spouse) {
- echo '<a href="', $spouse->getHtmlUrl(), '">';
+ echo '<a href="', e($spouse->url()), '">';
echo $spouse->getFullName();
echo '</a>';
}
@@ -690,7 +690,7 @@ class FunctionsPrintFacts {
if ($spouse) {
echo ' - ';
}
- echo '<a href="', $family->getHtmlUrl(), '">', I18N::translate('View this family'), '</a>';
+ echo '<a href="', e($family->url()), '">', I18N::translate('View this family'), '</a>';
}
}
}
@@ -789,7 +789,7 @@ class FunctionsPrintFacts {
echo '</th>';
echo '<td class="', $styleadd, '">';
if ($source) {
- echo '<a href="', $source->getHtmlUrl(), '">', $source->getFullName(), '</a>';
+ echo '<a href="', e($source->url()), '">', $source->getFullName(), '</a>';
// PUBL
$publ = $source->getFirstFact('PUBL');
if ($publ) {
@@ -988,7 +988,7 @@ class FunctionsPrintFacts {
if ($level < 2) {
if ($note instanceof Note) {
echo GedcomTag::getLabel('SHARED_NOTE');
- echo FontAwesome::linkIcon('note', I18N::translate('View'), ['class' => 'btn btn-link', 'href' => $note->getRawUrl()]);
+ echo FontAwesome::linkIcon('note', I18N::translate('View'), ['class' => 'btn btn-link', 'href' => $note->url()]);
} else {
echo GedcomTag::getLabel('NOTE');
}
@@ -1026,7 +1026,7 @@ class FunctionsPrintFacts {
// Note is already printed
echo GedcomTag::getLabel($factname, $parent);
if ($note) {
- echo FontAwesome::linkIcon('note', I18N::translate('View'), ['class' => 'btn btn-link', 'href' => $note->getRawUrl()]);
+ echo FontAwesome::linkIcon('note', I18N::translate('View'), ['class' => 'btn btn-link', 'href' => $note->url()]);
}
}
}
@@ -1140,7 +1140,7 @@ class FunctionsPrintFacts {
foreach ($media->mediaFiles() as $media_file) {
echo $media_file->displayImage(100, 100, 'contain', []);
}
- echo '<a href="' . $media->getHtmlUrl() . '"> ';
+ echo '<a href="' . e($media->url()) . '"> ';
echo '<em>';
foreach ($media->getAllNames() as $name) {
if ($name['type'] != 'TITL') {
diff --git a/app/Functions/FunctionsPrintLists.php b/app/Functions/FunctionsPrintLists.php
index 7d8ce58468..1d87793540 100644
--- a/app/Functions/FunctionsPrintLists.php
+++ b/app/Functions/FunctionsPrintLists.php
@@ -326,7 +326,7 @@ class FunctionsPrintLists {
$class = '';
$sex_image = '';
}
- $html .= '<a ' . $title . ' href="' . $individual->getHtmlUrl() . '"' . $class . '>' . $name['full'] . '</a>' . $sex_image . '<br>';
+ $html .= '<a ' . $title . ' href="' . e($individual->url()) . '"' . $class . '>' . $name['full'] . '</a>' . $sex_image . '<br>';
}
$html .= $individual->getPrimaryParentsNames('parents details1', 'none');
$html .= '</td>';
@@ -748,7 +748,7 @@ class FunctionsPrintLists {
}
// Only show married names if they are the name we are filtering by.
if ($name['type'] != '_MARNM' || $num == $husb->getPrimaryName()) {
- $html .= '<a ' . $title . ' href="' . $family->getHtmlUrl() . '"' . $class . '>' . $name['full'] . '</a>' . $sex_image . '<br>';
+ $html .= '<a ' . $title . ' href="' . e($family->url()) . '"' . $class . '>' . $name['full'] . '</a>' . $sex_image . '<br>';
}
}
// Husband parents
@@ -791,7 +791,7 @@ class FunctionsPrintLists {
}
// Only show married names if they are the name we are filtering by.
if ($name['type'] != '_MARNM' || $num == $wife->getPrimaryName()) {
- $html .= '<a ' . $title . ' href="' . $family->getHtmlUrl() . '"' . $class . '>' . $name['full'] . '</a>' . $sex_image . '<br>';
+ $html .= '<a ' . $title . ' href="' . e($family->url()) . '"' . $class . '>' . $name['full'] . '</a>' . $sex_image . '<br>';
}
}
// Wife parents
@@ -985,9 +985,9 @@ class FunctionsPrintLists {
$html .= '<br>';
}
if ($n == $source->getPrimaryName()) {
- $html .= '<a class="name2" href="' . $source->getHtmlUrl() . '">' . $name['full'] . '</a>';
+ $html .= '<a class="name2" href="' . e($source->url()) . '">' . $name['full'] . '</a>';
} else {
- $html .= '<a href="' . $source->getHtmlUrl() . '">' . $name['full'] . '</a>';
+ $html .= '<a href="' . e($source->url()) . '">' . $name['full'] . '</a>';
}
}
$html .= '</td>';
@@ -1069,7 +1069,7 @@ class FunctionsPrintLists {
}
$html .= '<tr' . $class . '>';
// Count of linked notes
- $html .= '<td data-sort="' . Html::escape($note->getSortName()) . '"><a class="name2" href="' . $note->getHtmlUrl() . '">' . $note->getFullName() . '</a></td>';
+ $html .= '<td data-sort="' . Html::escape($note->getSortName()) . '"><a class="name2" href="' . e($note->url()) . '">' . $note->getFullName() . '</a></td>';
$key = $note->getXref() . '@' . $note->getTree()->getTreeId();
// Count of linked individuals
$num = array_key_exists($key, $count_individuals) ? $count_individuals[$key] : 0;
@@ -1134,9 +1134,9 @@ class FunctionsPrintLists {
$html .= '<br>';
}
if ($n == $repository->getPrimaryName()) {
- $html .= '<a class="name2" href="' . $repository->getHtmlUrl() . '">' . $name['full'] . '</a>';
+ $html .= '<a class="name2" href="' . e($repository->url()) . '">' . $name['full'] . '</a>';
} else {
- $html .= '<a href="' . $repository->getHtmlUrl() . '">' . $name['full'] . '</a>';
+ $html .= '<a href="' . e($repository->url()) . '">' . $name['full'] . '</a>';
}
}
$html .= '</td>';
@@ -1215,7 +1215,7 @@ class FunctionsPrintLists {
$html .= '</td>';
// Media object name(s)
$html .= '<td data-sort="' . Html::escape($media_object->getSortName()) . '">';
- $html .= '<a href="' . $media_object->getHtmlUrl() . '" class="list_item name2">' . $name . '</a>';
+ $html .= '<a href="' . e($media_object->url()) . '" class="list_item name2">' . $name . '</a>';
$html .= '</td>';
// Count of linked individuals
@@ -1503,7 +1503,7 @@ class FunctionsPrintLists {
$record = $fact->getParent();
$html .= '<tr>';
$html .= '<td data-sort="' . Html::escape($record->getSortName()) . '">';
- $html .= '<a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>';
+ $html .= '<a href="' . e($record->url()) . '">' . $record->getFullName() . '</a>';
if ($record instanceof Individual) {
$html .= $record->getSexImage();
}
@@ -1611,7 +1611,7 @@ class FunctionsPrintLists {
foreach ($filtered_events as $fact) {
$record = $fact->getParent();
- $html .= '<a href="' . $record->getHtmlUrl() . '" class="list_item name2">' . $record->getFullName() . '</a>';
+ $html .= '<a href="' . e($record->url()) . '" class="list_item name2">' . $record->getFullName() . '</a>';
if ($record instanceof Individual) {
$html .= $record->getSexImage();
}
diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php
index 6c824fc88a..6c44b71f70 100644
--- a/app/GedcomRecord.php
+++ b/app/GedcomRecord.php
@@ -324,30 +324,32 @@ class GedcomRecord {
/**
* Generate a URL to this record, suitable for use in HTML, etc.
*
+ * @deprecated
+ *
* @return string
*/
public function getHtmlUrl() {
- return $this->getLinkUrl('&amp;');
+ return e($this->url());
}
/**
* Generate a URL to this record, suitable for use in javascript, HTTP headers, etc.
*
+ * @deprecated
+ *
* @return string
*/
public function getRawUrl() {
- return $this->getLinkUrl('&');
+ return $this->url();
}
/**
- * Generate a URL to this record.
- *
- * @param string $separator
+ * Generate a URL to this record, suitable for use in javascript, HTTP headers, etc.
*
* @return string
*/
- private function getLinkUrl($separator) {
- return static::URL_PREFIX . rawurlencode($this->getXref()) . $separator . 'ged=' . rawurlencode($this->tree->getName());
+ public function url() {
+ return static::URL_PREFIX . rawurlencode($this->getXref()) . '&ged=' . rawurlencode($this->tree->getName());
}
/**
@@ -770,7 +772,7 @@ class GedcomRecord {
if (is_null($name)) {
$name = $this->getFullName();
}
- $html = '<a href="' . $this->getHtmlUrl() . '"';
+ $html = '<a href="' . e($this->url()) . '"';
if ($find) {
$html .= ' onclick="pasteid(\'' . $this->getXref() . '\', \'' . htmlentities($name) . '\');"';
}
diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php
index f15eb6bd72..753df436ee 100644
--- a/app/Http/Controllers/AdminController.php
+++ b/app/Http/Controllers/AdminController.php
@@ -754,13 +754,13 @@ class AdminController extends BaseController {
$row->change_id,
$row->change_time,
I18N::translate($row->status),
- $record ? '<a href="' . $record->getHtmlUrl() . '">' . $record->getXref() . '</a>' : $row->xref,
+ $record ? '<a href="' . e($record->url()) . '">' . $record->getXref() . '</a>' : $row->xref,
'<div class="gedcom-data" dir="ltr">' .
preg_replace_callback('/@(' . WT_REGEX_XREF . ')@/',
function ($match) use ($tree) {
$record = GedcomRecord::getInstance($match[1], $tree);
- return $record ? '<a href="' . $record->getHtmlUrl() . '">' . $match[0] . '</a>' : $match[0];
+ return $record ? '<a href="' . e($record->url()) . '">' . $match[0] . '</a>' : $match[0];
},
implode("\n", $diff_lines)
) .
@@ -992,8 +992,8 @@ class AdminController extends BaseController {
return [
$tree->getName(),
$media->displayImage(100, 100, 'fit', ['class' => 'img-thumbnail']),
- '<a href="' . Html::escape($media->getRawUrl()) . '">' . $media->getFullName() . '</a>',
- '<a href="' . Html::escape($individual->getRawUrl()) . '">' . $individual->getFullName() . '</a>',
+ '<a href="' . Html::escape($media->url()) . '">' . $media->getFullName() . '</a>',
+ '<a href="' . Html::escape($individual->url()) . '">' . $individual->getFullName() . '</a>',
implode(' ', $facts),
];
}, $data);
@@ -1138,7 +1138,7 @@ class AdminController extends BaseController {
$media = $this->findMediaObjectsForMediaFile($original_path);
$media_links = array_map(function (Media $media) {
- return '<a href="' . e($media->getRawUrl()) . '">' . $media->getFullName() . '</a>';
+ return '<a href="' . e($media->url()) . '">' . $media->getFullName() . '</a>';
}, $media);
$media_links = implode('<br>', $media_links);
@@ -1296,7 +1296,7 @@ class AdminController extends BaseController {
if (Auth::user()->getPreference('auto_accept')) {
$record2_name = $record2->getFullName();
} else {
- $record2_name = '<a class="alert-link" href="' . $record2->getHtmlUrl() . '">' . $record2->getFullName() . '</a>';
+ $record2_name = '<a class="alert-link" href="' . e($record2->url()) . '">' . $record2->getFullName() . '</a>';
}
// Update records that link to the one we will be removing.
@@ -1308,7 +1308,7 @@ class AdminController extends BaseController {
FlashMessages::addMessage(I18N::translate(
/* I18N: The placeholders are the names of individuals, sources, etc. */
'The link from “%1$s” to “%2$s” has been updated.',
- '<a class="alert-link" href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>',
+ '<a class="alert-link" href="' . e($record->url()) . '">' . $record->getFullName() . '</a>',
$record2_name
), 'info');
$gedcom = str_replace('@' . $xref2 . '@', '@' . $xref1 . '@', $record->getGedcom());
@@ -1369,7 +1369,7 @@ class AdminController extends BaseController {
FlashMessages::addMessage(I18N::translate(
/* I18N: Records are individuals, sources, etc. */
'The records “%1$s” and “%2$s” have been merged.',
- '<a class="alert-link" href="' . $record1->getHtmlUrl() . '">' . $record1->getFullName() . '</a>',
+ '<a class="alert-link" href="' . e($record1->url()) . '">' . $record1->getFullName() . '</a>',
$record2_name
), 'success');
diff --git a/app/Http/Controllers/EditMediaController.php b/app/Http/Controllers/EditMediaController.php
index 538aff4e1f..ec2d3a2b12 100644
--- a/app/Http/Controllers/EditMediaController.php
+++ b/app/Http/Controllers/EditMediaController.php
@@ -101,7 +101,7 @@ class EditMediaController extends BaseController {
if ($file === '') {
FlashMessages::addMessage(I18N::translate('There was an error uploading your file.'));
- return new RedirectResponse($media->getRawUrl());
+ return new RedirectResponse($media->url());
}
$gedcom = '1 FILE ' . $file;
@@ -117,7 +117,7 @@ class EditMediaController extends BaseController {
// Accept the changes, to keep the filesystem in sync with the GEDCOM data.
FunctionsImport::acceptAllChanges($media->getxref(), $tree->getTreeId());
- return new RedirectResponse($media->getRawUrl());
+ return new RedirectResponse($media->url());
}
/**
@@ -250,7 +250,7 @@ class EditMediaController extends BaseController {
FunctionsImport::acceptAllChanges($media->getxref(), $tree->getTreeId());
}
- return new RedirectResponse($media->getRawUrl());
+ return new RedirectResponse($media->url());
}
/**
@@ -327,7 +327,7 @@ class EditMediaController extends BaseController {
'html' => view('modals/record-created', [
'title' => I18N::translate('The media object has been created'),
'name' => $record->getFullName(),
- 'url' => $record->getRawUrl(),
+ 'url' => $record->url(),
])
]);
}
diff --git a/app/Http/Controllers/EditNoteController.php b/app/Http/Controllers/EditNoteController.php
index 6ada791f9f..51b8a5329b 100644
--- a/app/Http/Controllers/EditNoteController.php
+++ b/app/Http/Controllers/EditNoteController.php
@@ -80,7 +80,7 @@ class EditNoteController extends BaseController {
'html' => view('modals/record-created', [
'title' => I18N::translate('The note has been created'),
'name' => $record->getFullName(),
- 'url' => $record->getRawUrl(),
+ 'url' => $record->url(),
])
]);
}
diff --git a/app/Http/Controllers/EditRepositoryController.php b/app/Http/Controllers/EditRepositoryController.php
index 1a7c69cdfe..dd3e667959 100644
--- a/app/Http/Controllers/EditRepositoryController.php
+++ b/app/Http/Controllers/EditRepositoryController.php
@@ -82,7 +82,7 @@ class EditRepositoryController extends BaseController {
'html' => view('modals/record-created', [
'title' => I18N::translate('The repository has been created'),
'name' => $record->getFullName(),
- 'url' => $record->getRawUrl(),
+ 'url' => $record->url(),
])
]);
}
diff --git a/app/Http/Controllers/EditSourceController.php b/app/Http/Controllers/EditSourceController.php
index 75a9ae65cf..79690764cd 100644
--- a/app/Http/Controllers/EditSourceController.php
+++ b/app/Http/Controllers/EditSourceController.php
@@ -120,7 +120,7 @@ class EditSourceController extends BaseController {
'html' => view('modals/record-created', [
'title' => I18N::translate('The source has been created'),
'name' => $record->getFullName(),
- 'url' => $record->getRawUrl(),
+ 'url' => $record->url(),
])
]);
}
diff --git a/app/Http/Controllers/EditSubmitterController.php b/app/Http/Controllers/EditSubmitterController.php
index de69980ebc..422949b25b 100644
--- a/app/Http/Controllers/EditSubmitterController.php
+++ b/app/Http/Controllers/EditSubmitterController.php
@@ -88,7 +88,7 @@ class EditSubmitterController extends BaseController {
'html' => view('modals/record-created', [
'title' => I18N::translate('The submitter has been created'),
'name' => $record->getFullName(),
- 'url' => $record->getRawUrl(),
+ 'url' => $record->url(),
])
]);
}
diff --git a/app/Module/BatchUpdateModule.php b/app/Module/BatchUpdateModule.php
index e78ea31ab9..d97629d38b 100644
--- a/app/Module/BatchUpdateModule.php
+++ b/app/Module/BatchUpdateModule.php
@@ -247,7 +247,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
<?= self::createSubmitButton(I18N::translate('next'), $this->next_xref) ?>
</div>
<div class="row form-group">
- <a class="lead" href="<?= $this->record->getHtmlUrl() ?>"><?= $this->record->getFullName() ?></a>
+ <a class="lead" href="<?= e($this->record->url()) ?>"><?= $this->record->getFullName() ?></a>
<?= $this->PLUGIN->getActionPreview($this->record) ?>
</div>
<div class="row form-group">
diff --git a/app/Module/ClippingsCart/ClippingsCartController.php b/app/Module/ClippingsCart/ClippingsCartController.php
index 7e16b06577..36446c57f0 100644
--- a/app/Module/ClippingsCart/ClippingsCartController.php
+++ b/app/Module/ClippingsCart/ClippingsCartController.php
@@ -235,11 +235,11 @@ class ClippingsCartController {
case 'FAM':
$filetext .= $record . "\n";
$filetext .= "1 SOUR @WEBTREES@\n";
- $filetext .= '2 PAGE ' . WT_BASE_URL . $object->getRawUrl() . "\n";
+ $filetext .= '2 PAGE ' . WT_BASE_URL . $object->url() . "\n";
break;
case 'SOUR':
$filetext .= $record . "\n";
- $filetext .= '1 NOTE ' . WT_BASE_URL . $object->getRawUrl() . "\n";
+ $filetext .= '1 NOTE ' . WT_BASE_URL . $object->url() . "\n";
break;
case 'OBJE':
// Add the file to the archive
diff --git a/app/Module/ClippingsCartModule.php b/app/Module/ClippingsCartModule.php
index 3ad78c8584..c5f7f0d53d 100644
--- a/app/Module/ClippingsCartModule.php
+++ b/app/Module/ClippingsCartModule.php
@@ -491,7 +491,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
<td class="list_value">
<i class="<?= $icon ?>"></i>
<?php
- echo '<a href="', $record->getHtmlUrl(), '">', $record->getFullName(), '</a>';
+ echo '<a href="', e($record->url()), '">', $record->getFullName(), '</a>';
?>
</td>
<td class="list_value center vmiddle"><a href="module.php?mod=clippings&amp;mod_action=index&amp;action=remove&amp;id=<?= $xref ?>" class="icon-remove" title="<?= I18N::translate('Remove') ?>"></a></td>
@@ -678,7 +678,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
if (!empty($icon)) {
$out .= '<i class="' . $icon . '"></i>';
}
- $out .= '<a href="' . $record->getHtmlUrl() . '">';
+ $out .= '<a href="' . e($record->url()) . '">';
if ($record instanceof Individual) {
$out .= $record->getSexImage();
}
diff --git a/app/Module/DescendancyModule.php b/app/Module/DescendancyModule.php
index 40f0a4c9c2..dc9c889d86 100644
--- a/app/Module/DescendancyModule.php
+++ b/app/Module/DescendancyModule.php
@@ -158,7 +158,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
'<i class="plusminus ' . $icon . '"></i>' .
$person->getSexImage() . $person->getFullName() . $lifespan .
'</a>' .
- FontAwesome::linkIcon('individual', $person->getFullName(), ['href' => $person->getRawUrl()]) .
+ FontAwesome::linkIcon('individual', $person->getFullName(), ['href' => $person->url()]) .
'<div>' . $spouses . '</div>' .
'</li>';
}
@@ -176,7 +176,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
$spouse = $family->getSpouse($person);
if ($spouse) {
$spouse_name = $spouse->getSexImage() . $spouse->getFullName();
- $spouse_link = FontAwesome::linkIcon('individual', $spouse->getFullName(), ['href' => $person->getRawUrl()]);
+ $spouse_link = FontAwesome::linkIcon('individual', $spouse->getFullName(), ['href' => $person->url()]);
} else {
$spouse_name = '';
$spouse_link = '';
@@ -189,7 +189,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
'<li class="sb_desc_indi_li">' .
'<a class="sb_desc_indi" href="#"><i class="plusminus icon-minus"></i>' . $spouse_name . $marr . '</a>' .
$spouse_link .
- FontAwesome::linkIcon('family', $family->getFullName(), ['href' => $family->getRawUrl()]) .
+ FontAwesome::linkIcon('family', $family->getFullName(), ['href' => $family->url()]) .
'<div>' . $this->loadChildren($family, $generations) . '</div>' .
'</li>';
}
diff --git a/app/Module/FamiliesSidebarModule.php b/app/Module/FamiliesSidebarModule.php
index 37dbe84c3c..31465f7548 100644
--- a/app/Module/FamiliesSidebarModule.php
+++ b/app/Module/FamiliesSidebarModule.php
@@ -209,7 +209,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
$out = '<ul>';
foreach ($families as $family) {
if ($family->canShowName()) {
- $out .= '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . ' ';
+ $out .= '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . ' ';
if ($family->canShow()) {
$marriage_year = $family->getMarriageYear();
if ($marriage_year) {
@@ -276,7 +276,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
foreach ($rows as $row) {
$family = Family::getInstance($row->xref, $tree, $row->gedcom);
if ($family->canShowName()) {
- $out .= '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . ' ';
+ $out .= '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . ' ';
if ($family->canShow()) {
$marriage_year = $family->getMarriageYear();
if ($marriage_year) {
diff --git a/app/Module/FamilyNavigatorModule.php b/app/Module/FamilyNavigatorModule.php
index 0382b5cdde..c0c74f10cc 100644
--- a/app/Module/FamilyNavigatorModule.php
+++ b/app/Module/FamilyNavigatorModule.php
@@ -116,7 +116,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
?>
<table class="table table-sm wt-facts-table">
<caption class="text-center">
- <a class="famnav_title" href="<?= $family->getHtmlUrl() ?>">
+ <a class="famnav_title" href="<?= e($family->url()) ?>">
<?= $title ?>
</a>
</caption>
@@ -135,7 +135,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
</th>
<td>
<?php if ($spouse->canShow()): ?>
- <a class="famnav_link" href="<?= $spouse->getHtmlUrl() ?>">
+ <a class="famnav_link" href="<?= e($spouse->url()) ?>">
<?= $spouse->getFullName() ?>
</a>
<div class="small">
@@ -162,7 +162,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
</th>
<td>
<?php if ($child->canShow()): ?>
- <a class="famnav_link" href="<?= $child->getHtmlUrl() ?>">
+ <a class="famnav_link" href="<?= e($child->url()) ?>">
<?= $child->getFullName() ?>
</a>
<div class="small">
@@ -191,7 +191,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
*/
private function getHTML($person, $showUnknown = false) {
if ($person instanceof Individual) {
- return sprintf(self::LNK, $person->getHtmlUrl(), $person->getFullName());
+ return sprintf(self::LNK, e($person->url()), $person->getFullName());
} elseif ($showUnknown) {
return sprintf(self::MSG, I18N::translate('unknown'));
} else {
diff --git a/app/Module/GoogleMapsModule.php b/app/Module/GoogleMapsModule.php
index eca8440b90..88c44a415f 100644
--- a/app/Module/GoogleMapsModule.php
+++ b/app/Module/GoogleMapsModule.php
@@ -524,14 +524,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
} else {
// The place is in the table but has empty values
if ($name) {
- $missing[] = '<a href="' . $person->getHtmlUrl() . '">' . $name . '</a>';
+ $missing[] = '<a href="' . e($person->url()) . '">' . $name . '</a>';
$miscount++;
}
}
} else {
// There was no place, or not listed in the map table
if ($name) {
- $missing[] = '<a href="' . $person->getHtmlUrl() . '">' . $name . '</a>';
+ $missing[] = '<a href="' . e($person->url()) . '">' . $name . '</a>';
$miscount++;
}
}
@@ -890,7 +890,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$event .= '<strong>' . $relationship . '</strong>';
$birth = $person->getFirstFact('BIRT');
- $data = addslashes($image . '<div class="gm-ancestor-link">' . $event . ' <span><a href="' . $person->getHtmlUrl() . '">' . $name . '</a></span>');
+ $data = addslashes($image . '<div class="gm-ancestor-link">' . $event . ' <span><a href="' . e($person->url()) . '">' . $name . '</a></span>');
$data .= $birth ? addslashes($birth->summary()) : '';
$data .= '</div>';
@@ -1299,13 +1299,13 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$parent = $fact->getParent();
if ($parent instanceof Individual && $parent->getXref() !== $indi->getXref()) {
// Childs birth
- $name = '<a href="' . $parent->getHtmlUrl() . '">' . $parent->getFullName() . '</a>';
+ $name = '<a href="' . e($parent->url()) . '">' . $parent->getFullName() . '</a>';
$label = strtr($parent->getSex(), ['F' => I18N::translate('Birth of a daughter'), 'M' => I18N::translate('Birth of a son'), 'U' => I18N::translate('Birth of a child')]);
$class = 'wt-gender-' . $parent->getSex();
$evtStr = '<div class="gm-event">' . $label . '<div><strong>' . $name . '</strong></div>' . $fact->getDate()->display(true) . '</div>';
} else {
$spouse = $parent instanceof Family ? $parent->getSpouse($indi) : null;
- $name = $spouse ? '<a href="' . $spouse->getHtmlUrl() . '">' . $spouse->getFullName() . '</a>' : '';
+ $name = $spouse ? '<a href="' . e($spouse->url()) . '">' . $spouse->getFullName() . '</a>' : '';
$label = $fact->getLabel();
$class = '';
if ($fact->getValue() && $spouse) {
diff --git a/app/Module/IndividualSidebarModule.php b/app/Module/IndividualSidebarModule.php
index adfb18f4be..3367749d06 100644
--- a/app/Module/IndividualSidebarModule.php
+++ b/app/Module/IndividualSidebarModule.php
@@ -209,7 +209,7 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
$out = '<ul>';
foreach ($indis as $person) {
if ($person->canShowName()) {
- $out .= '<li><a href="' . $person->getHtmlUrl() . '">' . $person->getSexImage() . ' ' . $person->getFullName() . ' ';
+ $out .= '<li><a href="' . e($person->url()) . '">' . $person->getSexImage() . ' ' . $person->getFullName() . ' ';
if ($person->canShow()) {
$bd = $person->getLifeSpan();
if (!empty($bd)) {
@@ -254,7 +254,7 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
foreach ($rows as $row) {
$person = Individual::getInstance($row->xref, $tree, $row->gedcom);
if ($person->canShowName()) {
- $out .= '<li><a href="' . $person->getHtmlUrl() . '">' . $person->getSexImage() . ' ' . $person->getFullName() . ' ';
+ $out .= '<li><a href="' . e($person->url()) . '">' . $person->getSexImage() . ' ' . $person->getFullName() . ' ';
if ($person->canShow()) {
$bd = $person->getLifeSpan();
if (!empty($bd)) {
diff --git a/app/Module/InteractiveTree/TreeView.php b/app/Module/InteractiveTree/TreeView.php
index 51e9d84ab0..13da2f3cf5 100644
--- a/app/Module/InteractiveTree/TreeView.php
+++ b/app/Module/InteractiveTree/TreeView.php
@@ -124,7 +124,7 @@ class TreeView {
*/
private function getPersonDetails(Individual $individual, Family $family = null) {
$hmtl = $this->getThumbnail($individual);
- $hmtl .= '<a class="tv_link" href="' . $individual->getHtmlUrl() . '">' . $individual->getFullName() . '</a> <a href="module.php?mod=tree&amp;mod_action=treeview&amp;rootid=' . $individual->getXref() . '" title="' . I18N::translate('Interactive tree of %s', strip_tags($individual->getFullName())) . '" class="icon-button_indi tv_link tv_treelink"></a>';
+ $hmtl .= '<a class="tv_link" href="' . e($individual->url()) . '">' . $individual->getFullName() . '</a> <a href="module.php?mod=tree&amp;mod_action=treeview&amp;rootid=' . $individual->getXref() . '" title="' . I18N::translate('Interactive tree of %s', strip_tags($individual->getFullName())) . '" class="icon-button_indi tv_link tv_treelink"></a>';
foreach ($individual->getFacts(WT_EVENTS_BIRT, true) as $fact) {
$hmtl .= $fact->summary();
}
@@ -326,7 +326,7 @@ class TreeView {
}
$sex = $individual->getSex();
- return '<div class="tv' . $sex . ' ' . $dashed . '"' . $title . '><a href="' . $individual->getHtmlUrl() . '"></a>' . $individual->getFullName() . ' <span class="dates">' . $individual->getLifeSpan() . '</span></div>';
+ return '<div class="tv' . $sex . ' ' . $dashed . '"' . $title . '><a href="' . e($individual->url()) . '"></a>' . $individual->getFullName() . ' <span class="dates">' . $individual->getLifeSpan() . '</span></div>';
}
/**
diff --git a/app/Module/LoggedInUsersModule.php b/app/Module/LoggedInUsersModule.php
index 30f23f9d9e..31ff692587 100644
--- a/app/Module/LoggedInUsersModule.php
+++ b/app/Module/LoggedInUsersModule.php
@@ -82,7 +82,7 @@ class LoggedInUsersModule extends AbstractModule implements ModuleBlockInterface
$content .= '<div class="logged_in_name">';
if ($individual) {
- $content .= '<a href="' . $individual->getHtmlUrl() . '">' . $user->getRealNameHtml() . '</a>';
+ $content .= '<a href="' . e($individual->url()) . '">' . $user->getRealNameHtml() . '</a>';
} else {
$content .= $user->getRealNameHtml();
}
diff --git a/app/Module/RecentChangesModule.php b/app/Module/RecentChangesModule.php
index 31a303c1c5..4f2d5f5171 100644
--- a/app/Module/RecentChangesModule.php
+++ b/app/Module/RecentChangesModule.php
@@ -219,11 +219,11 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface
$html = '';
foreach ($records as $record) {
- $html .= '<a href="' . $record->getHtmlUrl() . '" class="list_item name2">' . $record->getFullName() . '</a>';
+ $html .= '<a href="' . e($record->url()) . '" class="list_item name2">' . $record->getFullName() . '</a>';
$html .= '<div class="indent" style="margin-bottom: 5px;">';
if ($record instanceof Individual) {
if ($record->getAddName()) {
- $html .= '<a href="' . $record->getHtmlUrl() . '" class="list_item">' . $record->getAddName() . '</a>';
+ $html .= '<a href="' . e($record->url()) . '" class="list_item">' . $record->getAddName() . '</a>';
}
}
@@ -326,10 +326,10 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface
}
$html .= '</td>';
$html .= '<td data-sort="' . Html::escape($record->getSortName()) . '">';
- $html .= '<a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>';
+ $html .= '<a href="' . e($record->url()) . '">' . $record->getFullName() . '</a>';
$addname = $record->getAddName();
if ($addname) {
- $html .= '<div class="indent"><a href="' . $record->getHtmlUrl() . '">' . $addname . '</a></div>';
+ $html .= '<div class="indent"><a href="' . e($record->url()) . '">' . $addname . '</a></div>';
}
$html .= '</td>';
$html .= '<td data-sort="' . $record->lastChangeTimestamp(true) . '">' . $record->lastChangeTimestamp() . '</td>';
diff --git a/app/Module/RelativesTabModule.php b/app/Module/RelativesTabModule.php
index d1558b699f..e11748dcf1 100644
--- a/app/Module/RelativesTabModule.php
+++ b/app/Module/RelativesTabModule.php
@@ -115,7 +115,7 @@ class RelativesTabModule extends AbstractModule implements ModuleTabInterface {
</td>
<td>
<span class="subheaders"> <?= $label ?></span>
- <a href="<?= $family->getHtmlUrl() ?>"> - <?= I18N::translate('View this family') ?></a>
+ <a href="<?= e($family->url()) ?>"> - <?= I18N::translate('View this family') ?></a>
</td>
</tr>
</table>
diff --git a/app/Module/ReviewChangesModule.php b/app/Module/ReviewChangesModule.php
index fd02367bb5..ed311b6018 100644
--- a/app/Module/ReviewChangesModule.php
+++ b/app/Module/ReviewChangesModule.php
@@ -127,7 +127,7 @@ class ReviewChangesModule extends AbstractModule implements ModuleBlockInterface
foreach ($changes as $change) {
$record = GedcomRecord::getInstance($change->xref, $WT_TREE);
if ($record->canShow()) {
- $content .= '<li><a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a></li>';
+ $content .= '<li><a href="' . e($record->url()) . '">' . $record->getFullName() . '</a></li>';
}
}
$content .= '</ul>';
diff --git a/app/Module/SiteMapModule.php b/app/Module/SiteMapModule.php
index f3f0c2ef6b..595d420eb1 100644
--- a/app/Module/SiteMapModule.php
+++ b/app/Module/SiteMapModule.php
@@ -246,7 +246,7 @@ class SiteMapModule extends AbstractModule implements ModuleConfigInterface {
foreach ($records as $record) {
if ($record->canShowName()) {
$data .= '<url>';
- $data .= '<loc>' . WT_BASE_URL . $record->getHtmlUrl() . '</loc>';
+ $data .= '<loc>' . WT_BASE_URL . e($record->url()) . '</loc>';
$chan = $record->getFirstFact('CHAN');
if ($chan) {
$date = $chan->getDate();
diff --git a/app/Module/StoriesModule.php b/app/Module/StoriesModule.php
index cfb2fbe2af..7ae0530e98 100644
--- a/app/Module/StoriesModule.php
+++ b/app/Module/StoriesModule.php
@@ -379,7 +379,7 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
<td>
<?php $individual = Individual::getInstance($story->xref, $WT_TREE) ?>
<?php if ($individual): ?>
- <a href="<?= $individual->getHtmlUrl() ?>#tab-stories">
+ <a href="<?= e($individual->url()) ?>#tab-stories">
<?= $individual->getFullName() ?>
</a>
<?php else: ?>
@@ -457,7 +457,7 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
if (!$languages || in_array(WT_LOCALE, explode(',', $languages))) {
if ($indi) {
if ($indi->canShow()) {
- echo '<tr><td><a href="' . $indi->getHtmlUrl() . '#tab-stories">' . $story_title . '</a></td><td><a href="' . $indi->getHtmlUrl() . '#tab-stories">' . $indi->getFullName() . '</a></td></tr>';
+ echo '<tr><td><a href="' . e($indi->url()) . '#tab-stories">' . $story_title . '</a></td><td><a href="' . e($indi->url()) . '#tab-stories">' . $indi->getFullName() . '</a></td></tr>';
}
} else {
echo '<tr><td>', $story_title, '</td><td class="error">', $story->xref, '</td></tr>';
diff --git a/app/Module/TopPageViewsModule.php b/app/Module/TopPageViewsModule.php
index 2a77eaf899..5e23bb9e02 100644
--- a/app/Module/TopPageViewsModule.php
+++ b/app/Module/TopPageViewsModule.php
@@ -86,7 +86,7 @@ class TopPageViewsModule extends AbstractModule implements ModuleBlockInterface
if ($count_placement == 'before') {
$content .= '<td dir="ltr" style="text-align:right">[' . $count . ']</td>';
}
- $content .= '<td class="name2" ><a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a></td>';
+ $content .= '<td class="name2" ><a href="' . e($record->url()) . '">' . $record->getFullName() . '</a></td>';
if ($count_placement == 'after') {
$content .= '<td dir="ltr" style="text-align:right">[' . $count . ']</td>';
}
diff --git a/app/Module/UserWelcomeModule.php b/app/Module/UserWelcomeModule.php
index 788956bc9b..c21b615756 100644
--- a/app/Module/UserWelcomeModule.php
+++ b/app/Module/UserWelcomeModule.php
@@ -64,7 +64,7 @@ class UserWelcomeModule extends AbstractModule implements ModuleBlockInterface {
}
$links[] = [
- 'url' => $individual->getRawUrl(),
+ 'url' => $individual->url(),
'title' => I18N::translate('My individual record'),
'icon' => 'icon-indis',
];
diff --git a/app/Module/WelcomeBlockModule.php b/app/Module/WelcomeBlockModule.php
index 659084b446..4f315e2942 100644
--- a/app/Module/WelcomeBlockModule.php
+++ b/app/Module/WelcomeBlockModule.php
@@ -63,7 +63,7 @@ class WelcomeBlockModule extends AbstractModule implements ModuleBlockInterface
}
$links[] = [
- 'url' => $individual->getRawUrl(),
+ 'url' => $individual->url(),
'title' => I18N::translate('Default individual'),
'icon' => 'icon-indis',
];
diff --git a/app/Stats.php b/app/Stats.php
index 49eb09eee3..66e7a4b25b 100644
--- a/app/Stats.php
+++ b/app/Stats.php
@@ -1458,7 +1458,7 @@ class Stats {
$result = $date->display();
break;
case 'name':
- $result = '<a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>';
+ $result = '<a href="' . e($record->url()) . '">' . $record->getFullName() . '</a>';
break;
case 'place':
$fact = GedcomRecord::getInstance($row['d_gid'], $this->tree)->getFirstFact($row['d_fact']);
@@ -2272,7 +2272,7 @@ class Stats {
$result = I18N::number((int) ($row['age'] / 365.25));
break;
case 'name':
- $result = '<a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a>';
+ $result = '<a href="' . e($person->url()) . '">' . $person->getFullName() . '</a>';
break;
}
@@ -2341,9 +2341,9 @@ class Stats {
$age = FunctionsDate::getAgeAtEvent($age);
if ($person->canShow()) {
if ($type == 'list') {
- $top10[] = '<li><a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a> (' . $age . ')' . '</li>';
+ $top10[] = '<li><a href="' . e($person->url()) . '">' . $person->getFullName() . '</a> (' . $age . ')' . '</li>';
} else {
- $top10[] = '<a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a> (' . $age . ')';
+ $top10[] = '<a href="' . e($person->url()) . '">' . $person->getFullName() . '</a> (' . $age . ')';
}
}
}
@@ -2419,9 +2419,9 @@ class Stats {
}
$age = FunctionsDate::getAgeAtEvent($age);
if ($type === 'list') {
- $top10[] = '<li><a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a> (' . $age . ')' . '</li>';
+ $top10[] = '<li><a href="' . e($person->url()) . '">' . $person->getFullName() . '</a> (' . $age . ')' . '</li>';
} else {
- $top10[] = '<a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a> (' . $age . ')';
+ $top10[] = '<a href="' . e($person->url()) . '">' . $person->getFullName() . '</a> (' . $age . ')';
}
}
if ($type === 'list') {
@@ -2963,7 +2963,7 @@ class Stats {
}
break;
case 'name':
- $result = '<a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a>';
+ $result = '<a href="' . e($record->url()) . '">' . $record->getFullName() . '</a>';
break;
case 'place':
$fact = $record->getFirstFact($row['fact']);
@@ -3126,7 +3126,7 @@ class Stats {
}
break;
case 'name':
- $result = '<a href="' . $family->getHtmlUrl() . '">' . $person->getFullName() . '</a>';
+ $result = '<a href="' . e($family->url()) . '">' . $person->getFullName() . '</a>';
break;
case 'age':
$age = $row['age'];
@@ -3258,9 +3258,9 @@ class Stats {
if ($husb && $wife && ($husb->getAllDeathDates() && $wife->getAllDeathDates() || !$husb->isDead() || !$wife->isDead())) {
if ($family->canShow()) {
if ($type === 'list') {
- $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> (' . $age . ')' . '</li>';
+ $top10[] = '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> (' . $age . ')' . '</li>';
} else {
- $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> (' . $age . ')';
+ $top10[] = '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> (' . $age . ')';
}
}
if (++$i === $total) {
@@ -3349,9 +3349,9 @@ class Stats {
$age = FunctionsDate::getAgeAtEvent($age);
if ($family->canShow()) {
if ($type === 'list') {
- $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> (' . $age . ')' . '</li>';
+ $top10[] = '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> (' . $age . ')' . '</li>';
} else {
- $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> (' . $age . ')';
+ $top10[] = '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> (' . $age . ')';
}
}
}
@@ -3424,7 +3424,7 @@ class Stats {
}
break;
case 'name':
- $result = '<a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a>';
+ $result = '<a href="' . e($person->url()) . '">' . $person->getFullName() . '</a>';
break;
case 'age':
$age = $row['age'];
@@ -4410,7 +4410,7 @@ class Stats {
$result = I18N::number($row['tot']);
break;
case 'name':
- $result = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a>';
+ $result = '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a>';
break;
}
@@ -4450,9 +4450,9 @@ class Stats {
$family = Family::getInstance($rows[$c]['id'], $this->tree);
if ($family->canShow()) {
if ($type === 'list') {
- $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot']));
+ $top10[] = '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot']));
} else {
- $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot']));
+ $top10[] = '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot']));
}
}
}
@@ -4526,10 +4526,10 @@ class Stats {
$child2 = Individual::getInstance($fam['ch2'], $this->tree);
if ($type == 'name') {
if ($child1->canShow() && $child2->canShow()) {
- $return = '<a href="' . $child2->getHtmlUrl() . '">' . $child2->getFullName() . '</a> ';
+ $return = '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
$return .= I18N::translate('and') . ' ';
- $return .= '<a href="' . $child1->getHtmlUrl() . '">' . $child1->getFullName() . '</a>';
- $return .= ' <a href="' . $family->getHtmlUrl() . '">[' . I18N::translate('View this family') . ']</a>';
+ $return .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
+ $return .= ' <a href="' . e($family->url()) . '">[' . I18N::translate('View this family') . ']</a>';
} else {
$return = I18N::translate('This information is private and cannot be shown.');
}
@@ -4552,22 +4552,22 @@ class Stats {
if ($one && !in_array($fam['family'], $dist)) {
if ($child1->canShow() && $child2->canShow()) {
$return = '<li>';
- $return .= '<a href="' . $child2->getHtmlUrl() . '">' . $child2->getFullName() . '</a> ';
+ $return .= '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
$return .= I18N::translate('and') . ' ';
- $return .= '<a href="' . $child1->getHtmlUrl() . '">' . $child1->getFullName() . '</a>';
+ $return .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
$return .= ' (' . $age . ')';
- $return .= ' <a href="' . $family->getHtmlUrl() . '">[' . I18N::translate('View this family') . ']</a>';
+ $return .= ' <a href="' . e($family->url()) . '">[' . I18N::translate('View this family') . ']</a>';
$return .= '</li>';
$top10[] = $return;
$dist[] = $fam['family'];
}
} elseif (!$one && $child1->canShow() && $child2->canShow()) {
$return = '<li>';
- $return .= '<a href="' . $child2->getHtmlUrl() . '">' . $child2->getFullName() . '</a> ';
+ $return .= '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
$return .= I18N::translate('and') . ' ';
- $return .= '<a href="' . $child1->getHtmlUrl() . '">' . $child1->getFullName() . '</a>';
+ $return .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
$return .= ' (' . $age . ')';
- $return .= ' <a href="' . $family->getHtmlUrl() . '">[' . I18N::translate('View this family') . ']</a>';
+ $return .= ' <a href="' . e($family->url()) . '">[' . I18N::translate('View this family') . ']</a>';
$return .= '</li>';
$top10[] = $return;
}
@@ -4576,7 +4576,7 @@ class Stats {
$return = $child2->formatList('span', false, $child2->getFullName());
$return .= '<br>' . I18N::translate('and') . '<br>';
$return .= $child1->formatList('span', false, $child1->getFullName());
- $return .= '<br><a href="' . $family->getHtmlUrl() . '">[' . I18N::translate('View this family') . ']</a>';
+ $return .= '<br><a href="' . e($family->url()) . '">[' . I18N::translate('View this family') . ']</a>';
return $return;
} else {
@@ -5087,9 +5087,9 @@ class Stats {
$family = Family::getInstance($row['family'], $this->tree);
if ($family->canShow()) {
if ($type == 'list') {
- $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a></li>';
+ $top10[] = '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . '</a></li>';
} else {
- $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a>';
+ $top10[] = '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a>';
}
}
}
@@ -5246,9 +5246,9 @@ class Stats {
$family = Family::getInstance($row['id'], $this->tree);
if ($family->canShow()) {
if ($type === 'list') {
- $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot']));
+ $top10[] = '<li><a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot']));
} else {
- $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot']));
+ $top10[] = '<a href="' . e($family->url()) . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot']));
}
}
}
diff --git a/app/Theme/AbstractTheme.php b/app/Theme/AbstractTheme.php
index 5aa008712f..b95df679f9 100644
--- a/app/Theme/AbstractTheme.php
+++ b/app/Theme/AbstractTheme.php
@@ -814,7 +814,7 @@ abstract class AbstractTheme {
$content = '<span class="namedef name1">' . $individual->getFullName() . '</span>';
$icons = '';
if ($individual->canShow()) {
- $content = '<a href="' . $individual->getHtmlUrl() . '">' . $content . '</a>' .
+ $content = '<a href="' . e($individual->url()) . '">' . $content . '</a>' .
'<div class="namedef name1">' . $individual->getAddName() . '</div>';
$icons = '<div class="icons">' .
'<span class="iconz icon-zoomin" title="' . I18N::translate('Zoom in/out on this box.') . '"></span>' .
@@ -866,7 +866,7 @@ abstract class AbstractTheme {
$content = '<span class="namedef name1">' . $individual->getFullName() . '</span>';
$icons = '';
if ($individual->canShow()) {
- $content = '<a href="' . $individual->getHtmlUrl() . '">' . $content . '</a>' .
+ $content = '<a href="' . e($individual->url()) . '">' . $content . '</a>' .
'<div class="namedef name2">' . $individual->getAddName() . '</div>';
$icons = '<div class="icons">' .
'<span class="iconz icon-zoomin" title="' . I18N::translate('Zoom in/out on this box.') . '"></span>' .
@@ -910,7 +910,7 @@ abstract class AbstractTheme {
'<div data-pid="' . $individual->getXref() . '" class="person_box_template ' . $personBoxClass . ' iconz box-style0" style="width: ' . $this->parameter('compact-chart-box-x') . 'px; min-height: ' . $this->parameter('compact-chart-box-y') . 'px">' .
'<div class="compact_view">' .
$thumbnail .
- '<a href="' . $individual->getHtmlUrl() . '">' .
+ '<a href="' . e($individual->url()) . '">' .
'<span class="namedef name0">' . $individual->getFullName() . '</span>' .
'</a>' .
'<div class="inout2 details0">' . $individual->getLifeSpan() . '</div>' .
@@ -1057,14 +1057,14 @@ abstract class AbstractTheme {
$menus = [];
foreach ($individual->getSpouseFamilies() as $family) {
- $menus[] = new Menu('<strong>' . I18N::translate('Family with spouse') . '</strong>', $family->getHtmlUrl());
+ $menus[] = new Menu('<strong>' . I18N::translate('Family with spouse') . '</strong>', e($family->url()));
$spouse = $family->getSpouse($individual);
if ($spouse && $spouse->canShowName()) {
- $menus[] = new Menu($spouse->getFullName(), $spouse->getHtmlUrl());
+ $menus[] = new Menu($spouse->getFullName(), e($spouse->url()));
}
foreach ($family->getChildren() as $child) {
if ($child->canShowName()) {
- $menus[] = new Menu($child->getFullName(), $child->getHtmlUrl());
+ $menus[] = new Menu($child->getFullName(), e($child->url()));
}
}
}
@@ -1423,7 +1423,7 @@ abstract class AbstractTheme {
case 'NOTE':
$record = GedcomRecord::getInstance($favorite['gid'], $this->tree);
if ($record && $record->canShowName()) {
- $submenus[] = new Menu($record->getFullName(), $record->getHtmlUrl());
+ $submenus[] = new Menu($record->getFullName(), e($record->url()));
$records[] = $record;
}
break;
diff --git a/calendar.php b/calendar.php
index 9de5aefa31..67f7e92d44 100644
--- a/calendar.php
+++ b/calendar.php
@@ -640,7 +640,7 @@ function calendar_list_text($list, $tag1, $tag2, $show_sex_symbols) {
foreach ($list as $id => $facts) {
$tmp = GedcomRecord::getInstance($id, $WT_TREE);
- $html .= $tag1 . '<a href="' . $tmp->getHtmlUrl() . '">' . $tmp->getFullName() . '</a> ';
+ $html .= $tag1 . '<a href="' . e($tmp->url()) . '">' . $tmp->getFullName() . '</a> ';
if ($show_sex_symbols && $tmp instanceof Individual) {
switch ($tmp->getSex()) {
case 'M':
diff --git a/edit_changes.php b/edit_changes.php
index c4b9cdd41b..8437c8721a 100644
--- a/edit_changes.php
+++ b/edit_changes.php
@@ -158,7 +158,7 @@ foreach ($rows as $row) {
$row->message_url = Html::url('message.php', [
'to' => $row->user_name,
'subject' => I18N::translate('Pending changes') . ' - ' . strip_tags($row->record->getFullName()),
- 'body' => WT_BASE_URL . $row->record->getRawUrl(),
+ 'body' => WT_BASE_URL . $row->record->url(),
'ged' => $row->gedcom_name]
);
@@ -200,7 +200,7 @@ foreach ($rows as $row) {
<thead class="thead-default">
<tr>
<th colspan="5">
- <a href="<?= Html::escape($record_changes[0]->record->getRawUrl()) ?>"><?= $record_changes[0]->record->getFullName() ?></a>
+ <a href="<?= Html::escape($record_changes[0]->record->url()) ?>"><?= $record_changes[0]->record->getFullName() ?></a>
</th>
</tr>
<tr>
diff --git a/edit_interface.php b/edit_interface.php
index 0c2275cbb2..acf736d545 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -90,7 +90,7 @@ case 'editraw':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $record->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($record->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -136,7 +136,7 @@ case 'updateraw':
$record->updateRecord($gedcom, false);
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
case 'editrawfact':
@@ -158,7 +158,7 @@ case 'editrawfact':
}
}
if (!$edit_fact) {
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
}
@@ -200,7 +200,7 @@ case 'editrawfact':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $record->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($record->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -240,7 +240,7 @@ case 'updaterawfact':
}
}
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
case 'edit':
@@ -262,7 +262,7 @@ case 'edit':
}
}
if (!$edit_fact) {
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
}
@@ -328,7 +328,7 @@ case 'edit':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $record->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($record->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -404,7 +404,7 @@ case 'add':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $record->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($record->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -511,7 +511,7 @@ case 'update':
}
}
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
case 'add_child_to_family':
@@ -588,9 +588,9 @@ case 'add_child_to_family_action':
}
if (Filter::post('goto') === 'new') {
- header('Location: ' . $new_child->getRawUrl());
+ header('Location: ' . $new_child->url());
} else {
- header('Location: ' . $family->getRawUrl());
+ header('Location: ' . $family->url());
}
break;
@@ -664,9 +664,9 @@ case 'add_child_to_individual_action':
$family->createFact('1 CHIL @' . $child->getXref() . '@', true);
if (Filter::post('goto') === 'new') {
- header('Location: ' . $child->getRawUrl());
+ header('Location: ' . $child->url());
} else {
- header('Location: ' . $person->getRawUrl());
+ header('Location: ' . $person->url());
}
break;
@@ -747,9 +747,9 @@ case 'add_parent_to_individual_action':
}
if (Filter::post('goto') === 'new') {
- header('Location: ' . $parent->getRawUrl());
+ header('Location: ' . $parent->url());
} else {
- header('Location: ' . $person->getRawUrl());
+ header('Location: ' . $person->url());
}
break;
@@ -799,7 +799,7 @@ case 'add_unlinked_indi_action':
$new_indi = $controller->tree()->createRecord($gedrec);
if (Filter::post('goto') === 'new') {
- header('Location: ' . $new_indi->getRawUrl());
+ header('Location: ' . $new_indi->url());
} else {
header('Location: admin_trees_manage.php');
}
@@ -887,9 +887,9 @@ case 'add_spouse_to_individual_action':
$person->createFact('1 FAMS @' . $family->getXref() . '@', true);
if (Filter::post('goto') === 'new') {
- header('Location: ' . $spouse->getRawUrl());
+ header('Location: ' . $spouse->url());
} else {
- header('Location: ' . $person->getRawUrl());
+ header('Location: ' . $person->url());
}
break;
@@ -975,9 +975,9 @@ case 'add_spouse_to_family_action':
$family->createFact(trim($famrec), true); // trim leading \n
if (Filter::post('goto') === 'new') {
- header('Location: ' . $spouse->getRawUrl());
+ header('Location: ' . $spouse->url());
} else {
- header('Location: ' . $family->getRawUrl());
+ header('Location: ' . $family->url());
}
break;
@@ -1032,7 +1032,7 @@ case 'addfamlink':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $person->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($person->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -1085,7 +1085,7 @@ case 'linkfamaction':
$family->createFact('1 CHIL @' . $person->getXref() . '@', true);
}
- header('Location: ' . $person->getRawUrl());
+ header('Location: ' . $person->url());
break;
case 'linkspouse':
@@ -1137,7 +1137,7 @@ case 'linkspouse':
<?= FontAwesome::decorativeIcon('save') ?>
<?= /* I18N: A button label. */ I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $person->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($person->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */ I18N::translate('cancel') ?>
</a>
@@ -1203,7 +1203,7 @@ case 'linkspouseaction':
$person->createFact('1 FAMS @' . $family->getXref() . '@', true);
$spouse->createFact('1 FAMS @' . $family->getXref() . '@', true);
- header('Location: ' . $person->getRawUrl());
+ header('Location: ' . $person->url());
break;
case 'addmedia_links':
@@ -1271,7 +1271,7 @@ case 'editnote':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $note->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($note->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -1309,7 +1309,7 @@ case 'editnoteaction':
$record->updateRecord($gedrec, !$keep_chan);
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
case 'add-media-link':
@@ -1359,7 +1359,7 @@ case 'add-media-link':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $record->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($record->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -1388,7 +1388,7 @@ case 'save-media-link':
$record->createFact($gedcom, true);
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
break;
case 'editname':
@@ -1409,7 +1409,7 @@ case 'editname':
}
}
if (!$name_fact) {
- header('Location: ' . $person->getRawUrl());
+ header('Location: ' . $person->url());
break;
}
@@ -1598,7 +1598,7 @@ case 'changefamily':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $family->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($family->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */
I18N::translate('cancel') ?>
@@ -1717,7 +1717,7 @@ case 'changefamily_update':
}
}
- header('Location: ' . $family->getRawUrl());
+ header('Location: ' . $family->url());
break;
case 'reorder-media':
@@ -1763,7 +1763,7 @@ case 'reorder-media':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $individual->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($individual->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */ I18N::translate('cancel') ?>
</a>
@@ -1811,7 +1811,7 @@ case 'reorder-media-save':
$individual->updateRecord($gedcom, false);
- header('Location: ' . $individual->getRawUrl());
+ header('Location: ' . $individual->url());
break;
case 'reorder-names':
@@ -1857,7 +1857,7 @@ case 'reorder-names':
<?= /* I18N: A button label. */
I18N::translate('save') ?>
</button>
- <a class="btn btn-secondary" href="<?= $individual->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($individual->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */ I18N::translate('cancel') ?>
</a>
@@ -1905,7 +1905,7 @@ case 'reorder-names-save':
$individual->updateRecord($gedcom, false);
- header('Location: ' . $individual->getRawUrl());
+ header('Location: ' . $individual->url());
break;
case 'reorder-children':
@@ -1957,7 +1957,7 @@ case 'reorder-children':
<?= FontAwesome::decorativeIcon('sort') ?>
<?= /* I18N: A button label. */ I18N::translate('sort by date of birth') ?>
</button>
- <a class="btn btn-secondary" href="<?= $family->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($family->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */ I18N::translate('cancel') ?>
</a>
@@ -2005,7 +2005,7 @@ case 'reorder-children-save':
$family->updateRecord($gedcom, false);
- header('Location: ' . $family->getRawUrl());
+ header('Location: ' . $family->url());
break;
case 'reorder-spouses':
@@ -2057,7 +2057,7 @@ case 'reorder-spouses':
<?= FontAwesome::decorativeIcon('sort') ?>
<?= /* I18N: A button label. */ I18N::translate('sort by date of marriage') ?>
</button>
- <a class="btn btn-secondary" href="<?= $person->getHtmlUrl() ?>">
+ <a class="btn btn-secondary" href="<?= e($person->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */ I18N::translate('cancel') ?>
</a>
@@ -2105,7 +2105,7 @@ case 'reorder-spouses-save':
$individual->updateRecord($gedcom, false);
- header('Location: ' . $individual->getRawUrl());
+ header('Location: ' . $individual->url());
break;
}
@@ -2440,7 +2440,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
<?= /* I18N: A button label. */ I18N::translate('go to new individual') ?>
</button>
<?php endif ?>
- <a class="btn btn-secondary" href="<?= Html::escape($person ? $person->getRawUrl() : $family->getRawUrl()) ?>">
+ <a class="btn btn-secondary" href="<?= Html::escape($person ? $person->url() : $family->url()) ?>">
<?= FontAwesome::decorativeIcon('cancel') ?>
<?= /* I18N: A button label. */ I18N::translate('cancel') ?>
</a>
@@ -2626,7 +2626,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
*/
function check_record_access(GedcomRecord $record = null) {
if (!$record || !$record->canShow() || !$record->canEdit()) {
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
exit;
}
diff --git a/gedrecord.php b/gedrecord.php
index 3d371697bc..04903ba3f3 100644
--- a/gedrecord.php
+++ b/gedrecord.php
@@ -34,7 +34,7 @@ if (
$record instanceof Note ||
$record instanceof Media
) {
- header('Location: ' . $record->getRawUrl());
+ header('Location: ' . $record->url());
return;
}
diff --git a/individual.php b/individual.php
index 091cd7c02c..59c0fdc4e2 100644
--- a/individual.php
+++ b/individual.php
@@ -217,7 +217,7 @@ $individual_media = array_filter($individual_media);
<ul class="nav nav-tabs flex-wrap">
<?php foreach ($controller->getTabs() as $tab): ?>
<li class="nav-item">
- <a class="nav-link<?= $tab->isGrayedOut() ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" data-href="<?= $controller->record->getHtmlUrl(), '&amp;action=ajax&amp;module=', $tab->getName() ?>" href="#<?= $tab->getName() ?>">
+ <a class="nav-link<?= $tab->isGrayedOut() ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" data-href="<?= e($controller->record->url()), '&amp;action=ajax&amp;module=', $tab->getName() ?>" href="#<?= $tab->getName() ?>">
<?= $tab->getTitle() ?>
</a>
</li>
diff --git a/medialist.php b/medialist.php
index 888459ad83..4421bb12ca 100644
--- a/medialist.php
+++ b/medialist.php
@@ -174,7 +174,7 @@ if ($action === 'submit') {
<div class="card mb-4">
<div class="card-header">
<h4 class="card-title">
- <a href="<?= $media->getHtmlUrl() ?>"><?= $media->getFullName() ?></a>
+ <a href="<?= e($media->url()) ?>"><?= $media->getFullName() ?></a>
</h4>
</div>
<div class="card-body">
@@ -216,13 +216,13 @@ if ($action === 'submit') {
<div class="card-footer">
<?php
foreach ($media->linkedIndividuals('OBJE') as $individual) {
- echo '<a href="' . $individual->getHtmlUrl() . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>';
+ echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>';
}
foreach ($media->linkedFamilies('OBJE') as $family) {
- echo '<a href="' . $family->getHtmlUrl() . '">' . FontAwesome::semanticicon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>';
+ echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticicon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>';
}
foreach ($media->linkedSources('OBJE') as $source) {
- echo '<a href="' . $source->getHtmlUrl() . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>';
+ echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>';
} ?>
</div>
</div>
diff --git a/resources/views/admin/merge-records-step-2.php b/resources/views/admin/merge-records-step-2.php
index 1f66a9c883..e7a3607cdf 100644
--- a/resources/views/admin/merge-records-step-2.php
+++ b/resources/views/admin/merge-records-step-2.php
@@ -37,7 +37,7 @@
<td>
<div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div>
<?php if ($fact->getTarget()): ?>
- <a href="<?= $fact->getTarget()->getHtmlUrl() ?>">
+ <a href="<?= e($fact->getTarget()->url()) ?>">
<?= $fact->getTarget()->getFullName() ?>
</a>
<?php endif ?>
@@ -59,7 +59,7 @@
<div class="card">
<div class="card-header">
<h2 class="card-title">
- <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record1->getRawUrl()) . '">' . $record1->getFullName()) . '</a>' ?>
+ <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record1->url()) . '">' . $record1->getFullName()) . '</a>' ?>
</h2>
</div>
<div class="card-body">
@@ -84,7 +84,7 @@
<td>
<div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div>
<?php if ($fact->getTarget()): ?>
- <a href="<?= $fact->getTarget()->getHtmlUrl() ?>">
+ <a href="<?= e($fact->getTarget()->url()) ?>">
<?= $fact->getTarget()->getFullName() ?>
</a>
<?php endif ?>
@@ -105,7 +105,7 @@
<div class="card">
<div class="card-header">
<h2 class="card-title">
- <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record2->getRawUrl()) . '">' . $record2->getFullName()) . '</a>' ?>
+ <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record2->url()) . '">' . $record2->getFullName()) . '</a>' ?>
</h2>
</div>
<div class="card-body">
@@ -130,7 +130,7 @@
<td>
<div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div>
<?php if ($fact->getTarget()): ?>
- <a href="<?= $fact->getTarget()->getHtmlUrl() ?>">
+ <a href="<?= e($fact->getTarget()->url()) ?>">
<?= $fact->getTarget()->getFullName() ?>
</a>
<?php endif ?>
diff --git a/resources/views/admin/tree-privacy.php b/resources/views/admin/tree-privacy.php
index 290cca9e17..06a9c83343 100644
--- a/resources/views/admin/tree-privacy.php
+++ b/resources/views/admin/tree-privacy.php
@@ -232,7 +232,7 @@
<tr>
<td>
<?php if ($privacy_restriction->record): ?>
- <a href="<?= $privacy_restriction->record->getHtmlUrl() ?>"><?= $privacy_restriction->record->getFullName() ?></a>
+ <a href="<?= e($privacy_restriction->record->url()) ?>"><?= $privacy_restriction->record->getFullName() ?></a>
<?php elseif ($privacy_restriction->xref): ?>
<div class="text-danger">
<?= $privacy_restriction->xref ?> — <?= I18N::translate('this record does not exist') ?>
diff --git a/resources/views/blocks/research-tasks.php b/resources/views/blocks/research-tasks.php
index 1c219fb60b..931ae9de50 100644
--- a/resources/views/blocks/research-tasks.php
+++ b/resources/views/blocks/research-tasks.php
@@ -25,7 +25,7 @@
<?= $task->getDate()->display() ?>
</td>
<td data-sort="<?= e($task->getParent()->getSortName()) ?>">
- <a href="<?= $task->getParent()->getHtmlUrl() ?>">
+ <a href="<?= e($task->getParent()->url()) ?>">
<?= $task->getParent()->getFullName() ?>
</a>
</td>
diff --git a/resources/views/blocks/slide-show.php b/resources/views/blocks/slide-show.php
index 20c39767cf..97336dc42f 100644
--- a/resources/views/blocks/slide-show.php
+++ b/resources/views/blocks/slide-show.php
@@ -14,7 +14,7 @@
<figure class="text-center slide-show-figure">
<?= $media_file->displayImage(200, 200, '', ['class' => 'slide-show-image']) ?>
<figcaption class="slide-show-figcaption">
- <a href="<?= $media->getHtmlUrl() ?>">
+ <a href="<?= e($media->url()) ?>">
<b><?= $media->getFullName() ?></b>
</a>
</figcaption>
@@ -27,7 +27,7 @@
<ul class="slide-show-links">
<?php foreach ($media->linkedIndividuals('OBJE') as $individual): ?>
<?= I18N::translate('Individual') ?> —
- <a href="<?= e($individual->getRawUrl()) ?>" class="slide-show-link">
+ <a href="<?= e($individual->url()) ?>" class="slide-show-link">
<?= $individual->getFullName() ?>
</a>
<br>
@@ -35,7 +35,7 @@
<?php foreach ($media->linkedFamilies('OBJE') as $family): ?>
<?= I18N::translate('View this family') ?> —
- <a href="<?= e($family->getRawUrl()) ?>" class="slide-show-link">
+ <a href="<?= e($family->url()) ?>" class="slide-show-link">
<?= $family->getFullName() ?>
</a>
<br>
@@ -43,7 +43,7 @@
<?php foreach ($media->linkedSources('OBJE') as $source): ?>
<?= I18N::translate('View this source') ?> —
- <a href="<?= e($source->getRawUrl()) ?>" class="slide-show-link">
+ <a href="<?= e($source->url()) ?>" class="slide-show-link">
<?= $source->getFullName() ?>
</a>
<br>
diff --git a/resources/views/blocks/yahrzeit-list.php b/resources/views/blocks/yahrzeit-list.php
index c52b8c4942..8447afe56b 100644
--- a/resources/views/blocks/yahrzeit-list.php
+++ b/resources/views/blocks/yahrzeit-list.php
@@ -1,7 +1,7 @@
<?php use Fisharebest\Webtrees\I18N; ?>'
<?php foreach ($yahrzeits as $yahrzeit): ?>
- <a href="<?= e($yahrzeit->individual->getRawUrl()) ?>" class="list_item name2">
+ <a href="<?= e($yahrzeit->individual->url()) ?>" class="list_item name2">
<?= $yahrzeit->individual->getFullName() ?>
</a>
<?= $yahrzeit->individual->getSexImage() ?>
diff --git a/resources/views/blocks/yahrzeit-table.php b/resources/views/blocks/yahrzeit-table.php
index 342f348ed5..296618e1b7 100644
--- a/resources/views/blocks/yahrzeit-table.php
+++ b/resources/views/blocks/yahrzeit-table.php
@@ -14,7 +14,7 @@
<?php foreach ($yahrzeits as $yahrzeit): ?>
<tr>
<td data-sort="<?= e($yahrzeit->individual->getSortName()) ?>">
- <a href="<?= e($yahrzeit->individual->getRawUrl()) ?>">
+ <a href="<?= e($yahrzeit->individual->url()) ?>">
<?= $yahrzeit->individual->getFullname() ?>
<?php if ($yahrzeit->individual->getAddName()): ?>
<br>
diff --git a/resources/views/compact-chart-individual.php b/resources/views/compact-chart-individual.php
index 2e59b594e2..95c320c95d 100644
--- a/resources/views/compact-chart-individual.php
+++ b/resources/views/compact-chart-individual.php
@@ -2,7 +2,7 @@
<div class="h-100 person_boxNN person_box_template">&nbsp;</div>
<?php else: ?>
<div class="h-100 person_box<?= ['M' => '', 'F' => 'F', 'U' => 'NN'][$individual->getSex()]?> person_box_template">
- <a href="<?= e($individual->getRawUrl()) ?>">
+ <a href="<?= e($individual->url()) ?>">
<?= $individual->getFullName() ?>
</a>
<div class="small">
diff --git a/resources/views/tabs/album.php b/resources/views/tabs/album.php
index b0da1c9c69..f9f41fda9a 100644
--- a/resources/views/tabs/album.php
+++ b/resources/views/tabs/album.php
@@ -7,7 +7,7 @@
<?php endif ?>
<?php endforeach ?>
<figcaption class="figure-caption wt-album-tab-caption">
- <a href="<?= e($media->getRawUrl()) ?>">
+ <a href="<?= e($media->url()) ?>">
<?= $media->getFullName() ?>
</a>
</figcaption>
diff --git a/timeline.php b/timeline.php
index e9de7eff72..2417cd8770 100644
--- a/timeline.php
+++ b/timeline.php
@@ -394,7 +394,7 @@ $controller->pageHeader();
if ($indi && $indi->canShow()) {
echo $indi->getSexImage('large');
?>
- <a href="<?= $indi->getHtmlUrl() ?>"> <?= $indi->getFullName() ?><br>
+ <a href="<?= e($indi->url()) ?>"> <?= $indi->getFullName() ?><br>
<?= $indi->getAddName() ?><br>
</a>
<input type="hidden" name="pids[<?= $p ?>]" value="<?= Html::escape($pid) ?>">