diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-29 10:41:01 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-29 10:41:01 +0200 |
commit | d047d299bf77de9bcd30eeb1d5ade217aa63e913 (patch) | |
tree | 8d627d74da4dd7b0d1a87d7a64ca9515e929b775 | |
parent | 51888f746c8afe43c5fed90c8013a03788821099 (diff) | |
parent | 3865a1d92585cb31864b5d0f1b325c3585b5c681 (diff) | |
download | gitlab-ce-d047d299bf77de9bcd30eeb1d5ade217aa63e913.tar.gz |
Merge pull request #9318 from jvanbaarsen/allow-special-chars-bio
Allow special characters in users bio
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | app/models/user.rb | 2 | ||||
-rw-r--r-- | features/steps/profile/profile.rb | 24 |
3 files changed, 17 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG index 8fbf85df338..d208812af63 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -46,6 +46,9 @@ v 7.11.1 v 7.11.0 - Fall back to Plaintext when Syntaxhighlighting doesn't work. Fixes some buggy lexers (Hannes Rosenögger) - Get editing comments to work in Chrome 43 again. + - Allow special character in users bio. I.e.: I <3 GitLab + +v 7.11.0 (unreleased) - Fix broken view when viewing history of a file that includes a path that used to be another file (Stan Hu) - Don't show duplicate deploy keys - Fix commit time being displayed in the wrong timezone in some cases (Hannes Rosenögger) diff --git a/app/models/user.rb b/app/models/user.rb index c1bb51e86fc..4a6af1a26ed 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 diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb index b8f79f70ca4..32888eb17d9 100644 --- a/features/steps/profile/profile.rb +++ b/features/steps/profile/profile.rb @@ -7,21 +7,23 @@ class Spinach::Features::Profile < Spinach::FeatureSteps end step 'I change my profile info' do - fill_in "user_skype", with: "testskype" - fill_in "user_linkedin", with: "testlinkedin" - fill_in "user_twitter", with: "testtwitter" - fill_in "user_website_url", with: "testurl" - fill_in "user_location", with: "Ukraine" - click_button "Save changes" + fill_in 'user_skype', with: 'testskype' + fill_in 'user_linkedin', with: 'testlinkedin' + fill_in 'user_twitter', with: 'testtwitter' + fill_in 'user_website_url', with: 'testurl' + fill_in 'user_location', with: 'Ukraine' + fill_in 'user_bio', with: 'I <3 GitLab' + click_button 'Save changes' @user.reload end step 'I should see new profile info' do - @user.skype.should == 'testskype' - @user.linkedin.should == 'testlinkedin' - @user.twitter.should == 'testtwitter' - @user.website_url.should == 'testurl' - find("#user_location").value.should == "Ukraine" + expect(@user.skype).to eq 'testskype' + expect(@user.linkedin).to eq 'testlinkedin' + expect(@user.twitter).to eq 'testtwitter' + expect(@user.website_url).to eq 'testurl' + expect(@user.bio).to eq 'I <3 GitLab' + find('#user_location').value.should == 'Ukraine' end step 'I change my avatar' do |