mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 01:14:56 +08:00
FIX: adds data-topic-id to quick-access-item (#8422)
This fix will allow discourse-encrypt to decrypt messages titles of the quick-access-pannel for PMs
This commit is contained in:
parent
b120728999
commit
700bd280e4
|
@ -33,11 +33,19 @@ createWidget("quick-access-item", {
|
|||
return result;
|
||||
},
|
||||
|
||||
html({ icon, href }) {
|
||||
html({ href, icon }) {
|
||||
let content = this._contentHtml();
|
||||
|
||||
let topicId = href.match(/\/t\/.*?\/(\d+)/);
|
||||
if (topicId && topicId[1]) {
|
||||
topicId = escapeExpression(topicId[1]);
|
||||
content = `<span data-topic-id="${topicId}">${content}</span>`;
|
||||
}
|
||||
|
||||
return h("a", { attributes: { href } }, [
|
||||
iconNode(icon),
|
||||
new RawHtml({
|
||||
html: `<div>${this._usernameHtml()}${this._contentHtml()}</div>`
|
||||
html: `<div>${this._usernameHtml()}${content}</div>`
|
||||
})
|
||||
]);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user