Clean escape sequences for non-downloaded resources

This commit is contained in:
Luxferre
2024-10-08 17:51:22 +03:00
parent 9ef243263c
commit a43cec33b3
2 changed files with 18 additions and 15 deletions
+2
View File
@@ -482,6 +482,8 @@ proc urlfetch {inputurl refhist} {
set bfg_status [trunc "Rendering $inputurl..."]
.content.text configure -state normal
.content.text delete 1.0 end; # clear the previous contents
# remove all SGR escape sequences for non-downloaded responses
regsub -all {\033\[[0-9;]+m} $bfg_response "" bfg_response
$handler "$inputurl" "$rooturl" "$path" "$bfg_response" .content.text
.content.text configure -state disabled
refreshbookmarks