Fixed Regex(es)

This commit is contained in:
Tim Zallmann 2017-05-11 09:10:29 +02:00
parent 1491ed656e
commit 835d4487fb

View file

@ -281,7 +281,7 @@ module ApplicationHelper
def linkedin_url(user)
name = user.linkedin
if name =~ %r{\Ahttps?:\/\/(www\.)?linkedin\.com\/in\/(.*)\z}
if name =~ %r{\Ahttps?:\/\/(www\.)?linkedin\.com\/in\/}
name
else
"https://www.linkedin.com/in/#{name}"
@ -290,7 +290,7 @@ module ApplicationHelper
def twitter_url(user)
name = user.twitter
if name =~ %r{\Ahttps?:\/\/(www\.)?twitter\.com\/(.*)\z}
if name =~ %r{\Ahttps?:\/\/(www\.)?twitter\.com\/}
name
else
"https://www.twitter.com/#{name}"