mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 02:52:45 +08:00
FIX: no user card for users with . or - in username
This commit is contained in:
parent
c845fcb154
commit
7431c6ac3b
|
@ -37,7 +37,7 @@ export default Ember.Controller.extend({
|
||||||
|
|
||||||
show(username, postId, target) {
|
show(username, postId, target) {
|
||||||
// XSS protection (should be encapsulated)
|
// XSS protection (should be encapsulated)
|
||||||
username = username.toString().replace(/[^A-Za-z0-9_]/g, "");
|
username = username.toString().replace(/[^A-Za-z0-9_\.\-]/g, "");
|
||||||
|
|
||||||
// Don't show on mobile
|
// Don't show on mobile
|
||||||
if (Discourse.Mobile.mobileView) {
|
if (Discourse.Mobile.mobileView) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user