-
Notifications
You must be signed in to change notification settings - Fork 0
/
qualifications.pb.sanitizer.go
56 lines (36 loc) · 1.1 KB
/
qualifications.pb.sanitizer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Code generated by protoc-gen-customizer. DO NOT EDIT.
// source: resources/qualifications/qualifications.proto
package qualifications
import (
"github.com/galexrt/fivenet/pkg/htmlsanitizer"
)
func (m *Qualification) Sanitize() error {
m.Abbreviation = htmlsanitizer.StripTags(m.Abbreviation)
m.Content = htmlsanitizer.Sanitize(m.Content)
if m.Description != nil {
*m.Description = htmlsanitizer.StripTags(*m.Description)
}
m.Title = htmlsanitizer.Sanitize(m.Title)
return nil
}
func (m *QualificationRequest) Sanitize() error {
if m.ApproverComment != nil {
*m.ApproverComment = htmlsanitizer.StripTags(*m.ApproverComment)
}
if m.UserComment != nil {
*m.UserComment = htmlsanitizer.StripTags(*m.UserComment)
}
return nil
}
func (m *QualificationResult) Sanitize() error {
m.Summary = htmlsanitizer.StripTags(m.Summary)
return nil
}
func (m *QualificationShort) Sanitize() error {
m.Abbreviation = htmlsanitizer.StripTags(m.Abbreviation)
if m.Description != nil {
*m.Description = htmlsanitizer.StripTags(*m.Description)
}
m.Title = htmlsanitizer.Sanitize(m.Title)
return nil
}