diff --git a/modules/markup/file_preview.go b/modules/markup/file_preview.go index 5499eff18c..8b1442ed08 100644 --- a/modules/markup/file_preview.go +++ b/modules/markup/file_preview.go @@ -341,7 +341,7 @@ func (p *FilePreview) CreateHTML(locale translation.Locale) *html.Node { psubtitle := &html.Node{ Type: html.ElementNode, Data: atom.Span.String(), - Attr: []html.Attribute{{Key: "class", Val: "text small grey"}}, + Attr: []html.Attribute{{Key: "class", Val: "text grey"}}, } psubtitle.AppendChild(&html.Node{ Type: html.RawNode, diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index d503796eb6..9d0c40c9e8 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -721,7 +721,7 @@ func TestRender_FilePreview(t *testing.T) { `
`+ `path/to/file.go`+ `
`+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -755,7 +755,7 @@ func TestRender_FilePreview(t *testing.T) { `gogits/gogs – `+ `path/to/file.go`+ ``+ - ``+ + ``+ `Lines 2 to 3 in gogits/gogs@190d949`+ ``+ ``+ @@ -791,7 +791,7 @@ func TestRender_FilePreview(t *testing.T) { `gogits/gogs – `+ `single-line.txt`+ ``+ - ``+ + ``+ `Line 1 in gogits/gogs@4c1aaf5`+ ``+ ``+ @@ -834,7 +834,7 @@ func TestRender_FilePreview(t *testing.T) { `
`+ `path/to/file.go`+ `
`+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -865,7 +865,7 @@ func TestRender_FilePreview(t *testing.T) { `
`+ `path/to/file.go`+ `
`+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -898,7 +898,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -923,7 +923,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -954,7 +954,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -979,7 +979,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -1004,7 +1004,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -1039,7 +1039,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 1 to 2 in c991312`+ ``+ ``+ @@ -1072,7 +1072,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 1 to 2 in c991312`+ ``+ ``+ @@ -1107,7 +1107,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Lines 2 to 3 in 190d949`+ ``+ ``+ @@ -1142,7 +1142,7 @@ func TestRender_FilePreview(t *testing.T) { ``+ - ``+ + ``+ `Line 1 in eeb243c`+ ``+ ``+ diff --git a/modules/markup/sanitizer.go b/modules/markup/sanitizer.go index 7ff11f0844..384dd1fe94 100644 --- a/modules/markup/sanitizer.go +++ b/modules/markup/sanitizer.go @@ -122,7 +122,7 @@ func createDefaultPolicy() *bluemonday.Policy { policy.AllowAttrs("class").Matching(regexp.MustCompile("^ui table$")).OnElements("div") policy.AllowAttrs("class").Matching(regexp.MustCompile("^header$")).OnElements("div") policy.AllowAttrs("data-line-number").Matching(regexp.MustCompile("^[0-9]+$")).OnElements("span") - policy.AllowAttrs("class").Matching(regexp.MustCompile("^text small grey$")).OnElements("span") + policy.AllowAttrs("class").Matching(regexp.MustCompile("^text grey$")).OnElements("span") policy.AllowAttrs("class").Matching(regexp.MustCompile("^file-preview$")).OnElements("table") policy.AllowAttrs("class").Matching(regexp.MustCompile("^lines-escape$")).OnElements("td") policy.AllowAttrs("class").Matching(regexp.MustCompile("^toggle-escape-button btn interact-bg$")).OnElements("button")