From 69fae1a7e40419773540d936711591c284e563e6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 26 Jun 2019 12:11:44 -0400 Subject: [PATCH] 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() {