diff options
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/settings/personal.php b/settings/personal.php index 2c46a9f8dd2..6cbcc330cd9 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -220,8 +220,13 @@ $formsMap = array_map(function($form){ 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); + if (strpos($regs['class'], 'data-anchor-name') !== false) { + preg_match('%.*data-anchor-name="(?P<anchor>[^"]*)"%i', $regs['class'], $matches); + $anchor = $matches['anchor']; + } else { + $anchor = strtolower($sectionName); + $anchor = str_replace(' ', '-', $anchor); + } return array( 'anchor' => $anchor, |