From 67b8cb8977610bad1107aabfef89310a89f3e2a8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 26 Jun 2019 12:00:22 -0400 Subject: [PATCH 1/2] fix: restore uid in teasers userObj --- src/categories/recentreplies.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index b00dac3ccc..02def5dd3b 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -138,7 +138,6 @@ module.exports = function (Categories) { teaser.parentCid = parseInt(parentCids[teaser.cid], 10) || 0; teaser.tid = undefined; teaser.uid = undefined; - teaser.user.uid = undefined; teaser.topic = { slug: topicData[index].slug, title: topicData[index].title, From 69fae1a7e40419773540d936711591c284e563e6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 26 Jun 2019 12:11:44 -0400 Subject: [PATCH 2/2] fix: output span in buildAvatar helper instead of div In not-so-rare circumstances, the avatar generated is wrapped in an anchor so that when clicked, it goes to the user profile. Unfortunately, html 4 spec doesn't like block level elements inside anchors (since an anchor is an inline element), and even though we define html5 doctype, browsers still reorder the div and anchor, beats me as to why. So I can trick the browser by using a span. The css already styles it as inline-block so no further fixes are required. --- public/src/modules/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index 04b23f67f8..286327e10d 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -313,7 +313,7 @@ } styles.push('background-color: ' + userObj['icon:bgColor'] + ';'); - return '
' + userObj['icon:text'] + '
'; + return '' + userObj['icon:text'] + ''; } function register() {