diff options
Diffstat (limited to 'app/Controller')
| -rw-r--r-- | app/Controller/BranchesController.php | 3 | ||||
| -rw-r--r-- | app/Controller/FamilyBookController.php | 2 | ||||
| -rw-r--r-- | app/Controller/IndividualController.php | 5 | ||||
| -rw-r--r-- | app/Controller/IndividualListController.php | 5 | ||||
| -rw-r--r-- | app/Controller/TimelineController.php | 3 |
5 files changed, 11 insertions, 7 deletions
diff --git a/app/Controller/BranchesController.php b/app/Controller/BranchesController.php index 42f95e5be3..65863959a7 100644 --- a/app/Controller/BranchesController.php +++ b/app/Controller/BranchesController.php @@ -20,6 +20,7 @@ use Fisharebest\Webtrees\Database; use Fisharebest\Webtrees\Family; use Fisharebest\Webtrees\Filter; use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi; +use Fisharebest\Webtrees\Html; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; use Fisharebest\Webtrees\Soundex; @@ -55,7 +56,7 @@ class BranchesController extends PageController { if ($this->surname !== '') { $this->setPageTitle(/* I18N: %s is a surname */ - I18N::translate('Branches of the %s family', Filter::escapeHtml($this->surname))); + I18N::translate('Branches of the %s family', Html::escape($this->surname))); $this->loadIndividuals(); $self = Individual::getInstance($this->tree()->getUserPreference(Auth::user(), 'gedcomid'), $this->tree()); if ($self) { diff --git a/app/Controller/FamilyBookController.php b/app/Controller/FamilyBookController.php index 4f205987b1..bf50bced2b 100644 --- a/app/Controller/FamilyBookController.php +++ b/app/Controller/FamilyBookController.php @@ -269,7 +269,7 @@ class FamilyBookController extends ChartController { if ($genoffset > $count) { echo '<table cellspacing="0" cellpadding="0" border="0" >'; for ($i = 1; $i < (pow(2, ($genoffset) - $count) / 2); $i++) { - $this->printEmptyBox($this->getBoxDimensions()->width, $this->getBoxDimensions()->height); + $this->printEmptyBox(); echo '</tr>'; } echo '</table>'; 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 { diff --git a/app/Controller/IndividualListController.php b/app/Controller/IndividualListController.php index 854aba88aa..8510107ad0 100644 --- a/app/Controller/IndividualListController.php +++ b/app/Controller/IndividualListController.php @@ -18,6 +18,7 @@ namespace Fisharebest\Webtrees\Controller; use Fisharebest\Webtrees\Database; use Fisharebest\Webtrees\Family; use Fisharebest\Webtrees\Filter; +use Fisharebest\Webtrees\Html; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; @@ -541,7 +542,7 @@ class IndividualListController extends PageController { return I18N::translateContext('Unknown given name', '…'); break; default: - return Filter::escapeHtml($initial); + return Html::escape($initial); break; } } @@ -562,7 +563,7 @@ class IndividualListController extends PageController { return I18N::translate('None'); break; default: - return Filter::escapeHtml($initial); + return Html::escape($initial); break; } } diff --git a/app/Controller/TimelineController.php b/app/Controller/TimelineController.php index 11f5134a26..8251965429 100644 --- a/app/Controller/TimelineController.php +++ b/app/Controller/TimelineController.php @@ -22,6 +22,7 @@ use Fisharebest\Webtrees\Family; use Fisharebest\Webtrees\Filter; use Fisharebest\Webtrees\Functions\FunctionsDate; use Fisharebest\Webtrees\Functions\FunctionsPrint; +use Fisharebest\Webtrees\Html; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; use Fisharebest\Webtrees\Theme; @@ -232,7 +233,7 @@ class TimelineController extends PageController { echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>'; } } - echo ' ' . Filter::escapeHtml($desc); + echo ' ' . Html::escape($desc); if (!$event->getPlace()->isEmpty()) { echo ' — ' . $event->getPlace()->getShortName(); } |
