-
Notifications
You must be signed in to change notification settings - Fork 1
/
OutputFilter.php
44 lines (37 loc) · 1.05 KB
/
OutputFilter.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Filter;
use \Joomla\CMS\Filter\_OutputFilter;
defined('JPATH_PLATFORM') or die;
/**
* OutputFilter
*
* @since 1.7.0
*/
class OutputFilter extends _OutputFilter
{
/**
* This method processes a string and replaces all accented UTF-8 characters by unaccented
* ASCII-7 "equivalents", whitespaces are replaced by hyphens and the string is lowercase.
*
* @param string $string String to process
* @param string $language Language to transilterate to
*
* @return string Processed string
*
* @since 1.7.0
*/
public static function stringURLSafe($string, $language = '')
{
$str = str_replace('-', ' ', $string);
// start override core
require_once __DIR__ .'/VietAliasHelper.php';
$str = \VietAliasHelper::vt_safe_vietnamese($str);
return parent::stringURLSafe($str, $language);
}
}