Joomla 3.x:如何在菜单项别名中允许下划线

Joomla 3.x: How to allow underscore in menu item aliases

不幸的是,Joomla 3.x 将菜单项别名中的下划线替换为连字符

如何允许下划线? [没有 sh404SEF]。

我在 libraries/joomla/filter/output.php 中没有看到它(正如页面 Use underscore (_) in joomla menu alias 所说)。

在该文件中有一行:

$str = preg_replace('/(\s|[^A-Za-z0-9\-])+/', '-', $str);

把 _ 放在 z 和 0 之间