Skip to content

Commit e794ca4

Browse files
[5.4] Tightened site menu item edit button regex (#46569)
1 parent 8202bee commit e794ca4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layouts/joomla/edit/frontediting_modules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
$menuitemEditUrl = Uri::base() . 'administrator/index.php?option=com_menus&view=item&client_id=0&layout=edit&id=' . (int) $menuItemid;
5959
$moduleHtml = preg_replace(
6060
// Find the link
61-
'/(<li.*?\bitem-' . $menuItemid . '.*?>)/',
61+
'/(<li\b[^>]*\bitem-' . $menuItemid . '\b[^>]*>)/',
6262
// Create and add the edit link
6363
'\\1 <a class="jmenuedit small" href="' . $menuitemEditUrl . '" target="' . $target . '" title="' . Text::_('JLIB_HTML_EDIT_MENU_ITEM') . ' ' . sprintf(Text::_('JLIB_HTML_EDIT_MENU_ITEM_ID'), (int) $menuItemid) . '">
64-
<span class="icon-edit" aria-hidden="true"></span></a>',
64+
<span class="icon-edit" aria-hidden="true"></span></a> ',
6565
$moduleHtml
6666
);
6767
}

0 commit comments

Comments
 (0)