diff options
-rw-r--r-- | settings/admin.php | 4 | ||||
-rw-r--r-- | settings/personal.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/settings/admin.php b/settings/admin.php index 533b6152492..551608b5d25 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -197,8 +197,8 @@ if (\OC::$server->getLockingProvider() instanceof NoopLockingProvider) { } $formsMap = array_map(function ($form) { - if (preg_match('%(<h2[^>]*>.*?</h2>)%i', $form, $regs)) { - $sectionName = str_replace('<h2>', '', $regs[0]); + if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { + $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); $sectionName = str_replace('</h2>', '', $sectionName); $anchor = strtolower($sectionName); $anchor = str_replace(' ', '-', $anchor); diff --git a/settings/personal.php b/settings/personal.php index f4409e633cf..8823102e01a 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -137,8 +137,8 @@ $formsAndMore[]= ['anchor' => 'passwordform', 'section-name' => $l->t('Personal $forms=OC_App::getForms('personal'); $formsMap = array_map(function($form){ - if (preg_match('%(<h2[^>]*>.*?</h2>)%i', $form, $regs)) { - $sectionName = str_replace('<h2>', '', $regs[0]); + if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { + $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); $sectionName = str_replace('</h2>', '', $sectionName); $anchor = strtolower($sectionName); $anchor = str_replace(' ', '-', $anchor); |