From 9dbf32be7b9bc9f7288a23800ea096e83763f2df Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 15 Dec 2018 20:09:15 +0100 Subject: [PATCH] Include the localized page name to the [wsp] id This approach adds the title without conflicting with the custom label feature. It doesn't require any changes to the bbcode class, because `intval()` implicitly strips any non-numeric content that follows a number. See #2668 --- com.woltlab.wcf/bbcode.xml | 2 +- .../install/files/js/WoltLabSuite/Core/Ui/Page/Search.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/bbcode.xml b/com.woltlab.wcf/bbcode.xml index ca0e209b01..a9ee4c8622 100644 --- a/com.woltlab.wcf/bbcode.xml +++ b/com.woltlab.wcf/bbcode.xml @@ -198,7 +198,7 @@ wcf\system\bbcode\WoltLabSuitePageBBCode - + 1 diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search.js index 0285719e6f..e996240df9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search.js @@ -47,7 +47,10 @@ define(['Ajax', 'EventKey', 'Language', 'StringUtil', 'Dom/Util', 'Ui/Dialog'], _click: function (event) { event.preventDefault(); - _callbackSelect(elData(event.currentTarget, 'page-id')); + var page = event.currentTarget; + var pageTitle = elBySel('h3', page).textContent.replace(/['"]/g, ''); + + _callbackSelect(elData(page, 'page-id') + '#' + pageTitle); UiDialog.close(this); }, -- 2.20.1