summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-04-28 17:34:56 -0700
committer=Corey Hulen <corey@hulen.com>2016-04-28 17:34:56 -0700
commit30418b81a51a73f0d9e8b9c20a39e42f1db28061 (patch)
tree0e8c6e17c5d8b82a8422e57429632c0681bef6f3 /model/config.go
parentf31108b7c4ae9800c4142bb83ae89d00ab865f92 (diff)
downloadchat-30418b81a51a73f0d9e8b9c20a39e42f1db28061.tar.gz
chat-30418b81a51a73f0d9e8b9c20a39e42f1db28061.tar.bz2
chat-30418b81a51a73f0d9e8b9c20a39e42f1db28061.zip
Fixing help links
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index fd033c7cf..4bb2a7a49 100644
--- a/model/config.go
+++ b/model/config.go
@@ -343,26 +343,46 @@ func (o *Config) SetDefaults() {
*o.EmailSettings.PushNotificationContents = GENERIC_NOTIFICATION
}
+ if !IsSafeLink(o.SupportSettings.TermsOfServiceLink) {
+ o.SupportSettings.TermsOfServiceLink = nil
+ }
+
if o.SupportSettings.TermsOfServiceLink == nil {
o.SupportSettings.TermsOfServiceLink = new(string)
*o.SupportSettings.TermsOfServiceLink = "/static/help/terms.html"
}
+ if !IsSafeLink(o.SupportSettings.PrivacyPolicyLink) {
+ o.SupportSettings.PrivacyPolicyLink = nil
+ }
+
if o.SupportSettings.PrivacyPolicyLink == nil {
o.SupportSettings.PrivacyPolicyLink = new(string)
*o.SupportSettings.PrivacyPolicyLink = "/static/help/privacy.html"
}
+ if !IsSafeLink(o.SupportSettings.AboutLink) {
+ o.SupportSettings.AboutLink = nil
+ }
+
if o.SupportSettings.AboutLink == nil {
o.SupportSettings.AboutLink = new(string)
*o.SupportSettings.AboutLink = "/static/help/about.html"
}
+ if !IsSafeLink(o.SupportSettings.HelpLink) {
+ o.SupportSettings.HelpLink = nil
+ }
+
if o.SupportSettings.HelpLink == nil {
o.SupportSettings.HelpLink = new(string)
*o.SupportSettings.HelpLink = "/static/help/help.html"
}
+ if !IsSafeLink(o.SupportSettings.ReportAProblemLink) {
+ o.SupportSettings.ReportAProblemLink = nil
+ }
+
if o.SupportSettings.ReportAProblemLink == nil {
o.SupportSettings.ReportAProblemLink = new(string)
*o.SupportSettings.ReportAProblemLink = "/static/help/report_problem.html"