I have a string in Ruby on Rails. This string contains a '#' character. The problem is that my program interprets this '#' as comment, but it is part of a password string. How can I handle this?
The file is the config file for GitLab
Here is a snippet from the SMTP configuration where I'm struggling.
gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.xxx.com" gitlab_rails['smtp_port'] = 465gitlab_rails['smtp_user_name'] = "abc@xxx.com" gitlab_rails['smtp_password'] = "X#X" #<-- This is the problem in the gitlab.rb file gitlab_rails['smtp_domain'] = "xxx.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['gitlab_email_from'] = 'abc@xxx.com'gitlab_rails['gitlab_email_reply_to'] = 'abc@xxx.com'gitlab_rails['smtp_tls'] = true
I've tried '\#', tested the '%23', ...