mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-09 17:54:22 +02:00
polybar: sanitize a bit more untrusted inputs
This commit is contained in:
parent
eb55cf3e84
commit
2fdafc8d3a
2 changed files with 2 additions and 1 deletions
|
@ -950,7 +950,7 @@ async def network_manager_status(i3, event, *args):
|
|||
state = await nma.State
|
||||
if state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
|
||||
status.append(icons["vpn"])
|
||||
status.append(await nma.Id)
|
||||
status.append((await nma.Id).replace("%", "%%"))
|
||||
|
||||
# Final status line
|
||||
return " ".join(status)
|
||||
|
|
|
@ -177,6 +177,7 @@ if __name__ == "__main__":
|
|||
round(weather["daily"][0]["temp"]["max"]),
|
||||
),
|
||||
]
|
||||
city = city.replace('%', '%%')
|
||||
conditions.insert(0, f"%{{F#888}}%{{Tx}}%{{T-}} {city}%{{F-}}")
|
||||
output = " ".join(conditions).replace("%{Tx}", "%%{T%d}" % options.font_index)
|
||||
logger.debug("output: %s", output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue