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:
Sam Saffron 2019-11-28 16:38:26 +11:00
parent 700bd280e4
commit d10f55c3e9

View File

@ -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>`
})
]);
},