mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 04:34:13 -06:00
Merge pull request #3064 from fantasticfears/fix-user-card-number
FIX: user card can't expand when the username is number
This commit is contained in:
commit
97c1de2040
@ -33,7 +33,7 @@ export default ObjectController.extend({
|
|||||||
|
|
||||||
show: function(username, target) {
|
show: function(username, target) {
|
||||||
// XSS protection (should be encapsulated)
|
// XSS protection (should be encapsulated)
|
||||||
username = username.replace(/[^A-Za-z0-9_]/g, "");
|
username = username.toString().replace(/[^A-Za-z0-9_]/g, "");
|
||||||
var url = "/users/" + username;
|
var url = "/users/" + username;
|
||||||
|
|
||||||
// Don't show on mobile
|
// Don't show on mobile
|
||||||
|
Loading…
Reference in New Issue
Block a user