FIX: no user card for users with . or - in username

This commit is contained in:
Sam 2015-09-10 17:14:34 +10:00
parent c845fcb154
commit 7431c6ac3b

View File

@ -37,7 +37,7 @@ export default Ember.Controller.extend({
show(username, postId, target) {
// 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
if (Discourse.Mobile.mobileView) {