mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 07:34:18 +08:00
Revert "FIX: adds data-topic-id to quick-access-item (#8422)"
This reverts commit 700bd280e4
.
Oops looks like this breaks tests:
```
Module Failed: widget:quick-access-item
Test Failed: escapedContent attribute is not escaped
Assertion Failed: TypeError: Cannot read property 'match' of undefined
Expected: true, Actual: false
Test Failed: anonymous
Assertion Failed: failed, expected argument to be truthy, was: 0
Expected: true, Actual: 0
Assertion Failed: Element .enable-anonymous not found.
Test Failed: anonymous - switch back
Assertion Failed: failed, expected argument to be truthy, was: 0
Expected: true, Actual: 0
Assertion Failed: Element .disable-anonymous not found.
Test Failed: log out
Assertion Failed: failed, expected argument to be truthy, was: 0
Expected: true, Actual: 0
Assertion Failed: Element .logout not found.
Test Failed: content attribute is escaped
Assertion Failed: TypeError: Cannot read property 'match' of undefined
Expected: true, Actual: false
```
This commit is contained in:
parent
700bd280e4
commit
d10f55c3e9
|
@ -33,19 +33,11 @@ createWidget("quick-access-item", {
|
|||
return result;
|
||||
},
|
||||
|
||||
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>`;
|
||||
}
|
||||
|
||||
html({ icon, href }) {
|
||||
return h("a", { attributes: { href } }, [
|
||||
iconNode(icon),
|
||||
new RawHtml({
|
||||
html: `<div>${this._usernameHtml()}${content}</div>`
|
||||
html: `<div>${this._usernameHtml()}${this._contentHtml()}</div>`
|
||||
})
|
||||
]);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user