Clean escape sequences for non-downloaded resources
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
[style.link.focused]
|
||||
background=#111
|
||||
foreground=cyan
|
||||
|
||||
[style.link.normal]
|
||||
background=#111
|
||||
foreground=#eee
|
||||
|
||||
[widget]
|
||||
entryfont=Noto Sans
|
||||
entryfontsize=11
|
||||
@@ -7,16 +15,9 @@ statusfont=Noto Sans
|
||||
statusfontsize=11
|
||||
ttkTheme=gtkTtk
|
||||
|
||||
[style.link.normal]
|
||||
background=#111
|
||||
foreground=#eee
|
||||
|
||||
[style.link.focused]
|
||||
background=#111
|
||||
foreground=cyan
|
||||
|
||||
[bookmarks]
|
||||
AuraGem=gemini://auragem.letz.dev/
|
||||
Gopher servers alive=gopher://kamalatta.ddnss.de:70/1/links
|
||||
Gophoogle=gopher://shibboleths.org:70/1/home
|
||||
HOI.ST=gopher://hoi.st
|
||||
Nightfall City=nex://nightfall.city
|
||||
@@ -24,6 +25,10 @@ Project Gemini=gemini://geminiprotocol.net
|
||||
Spartan Portal=spartan://mozz.us
|
||||
TLGS=gemini://tlgs.one
|
||||
|
||||
[style.error]
|
||||
background=#111
|
||||
foreground=red
|
||||
|
||||
[style.general]
|
||||
background=#111
|
||||
foreground=#eee
|
||||
@@ -32,15 +37,11 @@ monofontsize=12
|
||||
textfont=Noto Sans
|
||||
textfontsize=12
|
||||
|
||||
[style.error]
|
||||
background=#111
|
||||
foreground=red
|
||||
[style.highlight]
|
||||
background=yellow
|
||||
foreground=#111
|
||||
|
||||
[net]
|
||||
timeout=5000
|
||||
tls=on
|
||||
|
||||
[style.highlight]
|
||||
background=yellow
|
||||
foreground=#111
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user