diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-06-28 11:27:44 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-06-28 11:33:16 +0100 |
| commit | 4d35caa736b1f4119b8a949d1cbca5644dbf4e23 (patch) | |
| tree | 2c47f968ccb5710a842688aa489624bcd7e5d2ca /app/Functions/FunctionsPrint.php | |
| parent | 1197bb9cb49467b99c3a10f99876cf6c5b3b37ff (diff) | |
| download | webtrees-4d35caa736b1f4119b8a949d1cbca5644dbf4e23.tar.gz webtrees-4d35caa736b1f4119b8a949d1cbca5644dbf4e23.tar.bz2 webtrees-4d35caa736b1f4119b8a949d1cbca5644dbf4e23.zip | |
Fix: #2600 - refactor markdown formatting to allow XREF links to be disabled
Diffstat (limited to 'app/Functions/FunctionsPrint.php')
| -rw-r--r-- | app/Functions/FunctionsPrint.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php index 35eb61b542..4ba4907a5a 100644 --- a/app/Functions/FunctionsPrint.php +++ b/app/Functions/FunctionsPrint.php @@ -24,7 +24,6 @@ use Fisharebest\Webtrees\Auth; use Fisharebest\Webtrees\Date; use Fisharebest\Webtrees\Fact; use Fisharebest\Webtrees\Family; -use Fisharebest\Webtrees\Filter; use Fisharebest\Webtrees\Gedcom; use Fisharebest\Webtrees\GedcomRecord; use Fisharebest\Webtrees\I18N; @@ -37,7 +36,6 @@ use Fisharebest\Webtrees\Services\ModuleService; use Fisharebest\Webtrees\Tree; use Illuminate\Support\Collection; use Illuminate\Support\Str; -use LogicException; use Ramsey\Uuid\Uuid; use function app; @@ -50,13 +48,11 @@ use function explode; use function in_array; use function preg_match; use function preg_match_all; -use function preg_replace_callback; use function preg_split; use function str_contains; use function strip_tags; use function strlen; use function strpos; -use function strtoupper; use function substr; use function uasort; use function view; @@ -92,14 +88,14 @@ class FunctionsPrint assert($note instanceof Note); $label = I18N::translate('Shared note'); - $html = Filter::formatText($note->getNote(), $tree); + $html = Registry::markdownFactory()->markdown($tree)->convertToHtml($note->getNote()); $first_line = '<a href="' . e($note->url()) . '">' . $note->fullName() . '</a>'; $one_line_only = strip_tags($note->fullName()) === strip_tags($note->getNote()); } else { // Inline note. $label = I18N::translate('Note'); - $html = Filter::formatText($text, $tree); + $html = Registry::markdownFactory()->markdown($tree)->convertToHtml($text); [$first_line] = explode("\n", strip_tags($text)); // Use same logic as note objects |
