Commit d047d299 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #9318 from jvanbaarsen/allow-special-chars-bio

Allow special characters in users bio
parents 51888f74 3865a1d9
...@@ -46,6 +46,9 @@ v 7.11.1 ...@@ -46,6 +46,9 @@ v 7.11.1
v 7.11.0 v 7.11.0
- Fall back to Plaintext when Syntaxhighlighting doesn't work. Fixes some buggy lexers (Hannes Rosenögger) - 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. - 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) - 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 - Don't show duplicate deploy keys
- Fix commit time being displayed in the wrong timezone in some cases (Hannes Rosenögger) - Fix commit time being displayed in the wrong timezone in some cases (Hannes Rosenögger)
......
...@@ -483,7 +483,7 @@ class User < ActiveRecord::Base ...@@ -483,7 +483,7 @@ class User < ActiveRecord::Base
end end
def sanitize_attrs 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) value = self.send(attr)
self.send("#{attr}=", Sanitize.clean(value)) if value.present? self.send("#{attr}=", Sanitize.clean(value)) if value.present?
end end
......
...@@ -7,21 +7,23 @@ class Spinach::Features::Profile < Spinach::FeatureSteps ...@@ -7,21 +7,23 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end end
step 'I change my profile info' do step 'I change my profile info' do
fill_in "user_skype", with: "testskype" fill_in 'user_skype', with: 'testskype'
fill_in "user_linkedin", with: "testlinkedin" fill_in 'user_linkedin', with: 'testlinkedin'
fill_in "user_twitter", with: "testtwitter" fill_in 'user_twitter', with: 'testtwitter'
fill_in "user_website_url", with: "testurl" fill_in 'user_website_url', with: 'testurl'
fill_in "user_location", with: "Ukraine" fill_in 'user_location', with: 'Ukraine'
click_button "Save changes" fill_in 'user_bio', with: 'I <3 GitLab'
click_button 'Save changes'
@user.reload @user.reload
end end
step 'I should see new profile info' do step 'I should see new profile info' do
@user.skype.should == 'testskype' expect(@user.skype).to eq 'testskype'
@user.linkedin.should == 'testlinkedin' expect(@user.linkedin).to eq 'testlinkedin'
@user.twitter.should == 'testtwitter' expect(@user.twitter).to eq 'testtwitter'
@user.website_url.should == 'testurl' expect(@user.website_url).to eq 'testurl'
find("#user_location").value.should == "Ukraine" expect(@user.bio).to eq 'I <3 GitLab'
find('#user_location').value.should == 'Ukraine'
end end
step 'I change my avatar' do step 'I change my avatar' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment