mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 07:34:40 +08:00
FIX: no user card for users with . or - in username
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user