Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2015-05-21 11:44:17 +0300
committerJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2015-05-28 11:45:22 +0300
commit3865a1d92585cb31864b5d0f1b325c3585b5c681 (patch)
treeb578afdae51d5d4b140bd2b770b222c8bde309a7 /app/models/user.rb
parent5322099464ffa5f39076678f648243168ccdc506 (diff)
Allow special characters in users bio
**What does this do?** It removes the very strict sanitation on the users bio field, so that people can have a bio like "I <3 GitLab" **Why is this needed?** Currently when you enter a bio with "I <3 GitLab", we only store "I ". This is unexpected behaviour, since we want users to have a normal profile, without having to worry what characters are allowed and which are not. **Related issues:** Fixes https://github.com/gitlabhq/gitlabhq/issues/5625 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 50ca4bc5acc..65e726f7d5c 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -483,7 +483,7 @@ class User < ActiveRecord::Base
end
def sanitize_attrs
- %w(name username skype linkedin twitter bio).each do |attr|
+ %w(name username skype linkedin twitter).each do |attr|
value = self.send(attr)
self.send("#{attr}=", Sanitize.clean(value)) if value.present?
end