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