File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ func init() {
104
104
trMap [TagsOff ] = ReplaceFunction (RemoveTags )
105
105
trMap [TagsOffExceptTextareaClose ] = ReplaceFunction (RemoveTagsExceptTextareaClose )
106
106
trMap [TagsOffUntilTextareaClose ] = ReplaceFunction (RemoveTagsUntilTextareaClose )
107
- trMap [TextareaCloseOff ] = NewRegexpMatchEraser ( `(?i)</(textarea[^>]*)>` )
107
+ trMap [TextareaCloseOff ] = ReplaceFunction ( removeTextareaClose )
108
108
trMap [TextareaSafe ] = ReplaceFunction (ReplaceTextareaSafe )
109
109
}
110
110
@@ -271,6 +271,12 @@ func ReplaceTextareaSafe(src string) (out string) {
271
271
return out
272
272
}
273
273
274
+ func removeTextareaClose (in string ) (out string ) {
275
+ re := regexp .MustCompile (`(?i)(</textarea\s*>)` )
276
+ out = re .ReplaceAllLiteralString (in , "" )
277
+ return
278
+ }
279
+
274
280
func backslashDoublequotes (in string ) (out string ) {
275
281
for _ , r := range in {
276
282
switch r {
You can’t perform that action at this time.
0 commit comments