diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e1e901c2..42bcce1d 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -17,6 +17,7 @@
# with BigBlueButton; if not, see .
require 'bbb_api'
+require 'uri'
require 'i18n/language/mapping'
module ApplicationHelper
@@ -139,4 +140,11 @@ module ApplicationHelper
def google_analytics_url
"https://www.googletagmanager.com/gtag/js?id=#{ENV['GOOGLE_ANALYTICS_TRACKING_ID']}"
end
+
+ def valid_url?(input)
+ uri = URI.parse(input)
+ !uri.host.nil?
+ rescue URI::InvalidURIError
+ false
+ end
end
diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb
index c8efbc60..069fa03a 100755
--- a/app/views/shared/_header.html.erb
+++ b/app/views/shared/_header.html.erb
@@ -44,7 +44,7 @@