File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,6 +147,8 @@ func cna(p *Post) (string, error) {
147147
148148 re := regexp .MustCompile (`<a.*?>` )
149149 body = re .ReplaceAllString (body , "" )
150+ re = regexp .MustCompile (`<script.*?</script>` )
151+ body = re .ReplaceAllString (body , "" )
150152 re = regexp .MustCompile (`<iframe.*?</iframe>` )
151153 body = re .ReplaceAllString (body , "" )
152154
Original file line number Diff line number Diff line change @@ -134,6 +134,10 @@ func ltn(p *Post) (string, error) {
134134 body = re .ReplaceAllString (body , "" )
135135 re = regexp .MustCompile (`</a>` )
136136 body = re .ReplaceAllString (body , "" )
137+ re = regexp .MustCompile (`<script.*?</script>` )
138+ body = re .ReplaceAllString (body , "" )
139+ re = regexp .MustCompile (`<blockquote.*?</blockquote>` )
140+ body = re .ReplaceAllString (body , "" )
137141 re = regexp .MustCompile (`<iframe.*?</iframe>` )
138142 body = re .ReplaceAllString (body , "" )
139143
You can’t perform that action at this time.
0 commit comments