xref: /webtrees/app/Html.php (revision 6bdf767435631ad1dc27ec1ffd855d43dbdce907)
1cd937586SGreg Roach<?php
2cd937586SGreg Roach/**
3cd937586SGreg Roach * webtrees: online genealogy
4*6bdf7674SGreg Roach * Copyright (C) 2017 webtrees development team
5cd937586SGreg Roach * This program is free software: you can redistribute it and/or modify
6cd937586SGreg Roach * it under the terms of the GNU General Public License as published by
7cd937586SGreg Roach * the Free Software Foundation, either version 3 of the License, or
8cd937586SGreg Roach * (at your option) any later version.
9cd937586SGreg Roach * This program is distributed in the hope that it will be useful,
10cd937586SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
11cd937586SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12cd937586SGreg Roach * GNU General Public License for more details.
13cd937586SGreg Roach * You should have received a copy of the GNU General Public License
14cd937586SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
15cd937586SGreg Roach */
1676692c8bSGreg Roachnamespace Fisharebest\Webtrees;
17cd937586SGreg Roach
18cd937586SGreg Roach/**
19cd937586SGreg Roach * Class Html - Add HTML markup to elements consistently.
20cd937586SGreg Roach */
21cd937586SGreg Roachclass Html {
22cd937586SGreg Roach	/**
23cd937586SGreg Roach	 * Filenames are (almost?) always LTR, even on RTL systems.
24cd937586SGreg Roach	 *
25cd937586SGreg Roach	 * @param string $filename
26cd937586SGreg Roach	 *
27cd937586SGreg Roach	 * @return string
28cd937586SGreg Roach	 */
29cd937586SGreg Roach	public static function filename($filename) {
30cd937586SGreg Roach		return '<samp class="filename" dir="ltr">' . Filter::escapeHtml($filename) . '</samp>';
31cd937586SGreg Roach	}
32cd937586SGreg Roach}
33