loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove `rel` and `id` attributes that only add the linenumber to elements

-4
-3
modules/markup/file_preview.go
··· 149 149 Type: html.ElementNode, 150 150 Data: atom.Td.String(), 151 151 Attr: []html.Attribute{ 152 - {Key: "id", Val: "L" + lineNum}, 153 152 {Key: "class", Val: "lines-num"}, 154 153 }, 155 154 } ··· 157 156 Type: html.ElementNode, 158 157 Data: atom.Span.String(), 159 158 Attr: []html.Attribute{ 160 - {Key: "id", Val: "L" + lineNum}, 161 159 {Key: "data-line-number", Val: lineNum}, 162 160 }, 163 161 } ··· 200 198 Type: html.ElementNode, 201 199 Data: atom.Td.String(), 202 200 Attr: []html.Attribute{ 203 - {Key: "rel", Val: "L" + lineNum}, 204 201 {Key: "class", Val: "lines-code chroma"}, 205 202 }, 206 203 }
-1
modules/markup/sanitizer.go
··· 128 128 policy.AllowAttrs("class").Matching(regexp.MustCompile("^header$")).OnElements("div") 129 129 policy.AllowAttrs("data-line-number").Matching(regexp.MustCompile("^[0-9]+$")).OnElements("span") 130 130 policy.AllowAttrs("class").Matching(regexp.MustCompile("^text small grey$")).OnElements("span") 131 - policy.AllowAttrs("rel").Matching(regexp.MustCompile("^L[0-9]+$")).OnElements("td") 132 131 policy.AllowAttrs("class").Matching(regexp.MustCompile("^file-preview*")).OnElements("table") 133 132 policy.AllowAttrs("class").Matching(regexp.MustCompile("^lines-escape$")).OnElements("td") 134 133 policy.AllowAttrs("class").Matching(regexp.MustCompile("^toggle-escape-button btn interact-bg$")).OnElements("button")