From: plugd Date: Tue, 3 Aug 2021 08:09:39 +0000 (+0200) Subject: Sanitize display strings for use in header. X-Git-Tag: v3.2.2~5 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=766a56746d122a9a35d5ac76830acb3123134c70;p=elpher.git Sanitize display strings for use in header. --- diff --git a/elpher.el b/elpher.el index ccba716..b9c43f8 100644 --- a/elpher.el +++ b/elpher.el @@ -577,13 +577,14 @@ previously-visited pages,unless NO-HISTORY is non-nil." "If `elpher-use-header' is true, display current page info in window header." (if elpher-use-header (let* ((display-string (elpher-page-display-string elpher-current-page)) + (sanitized-display-string (replace-regexp-in-string "%" "%%" display-string)) (address (elpher-page-address elpher-current-page)) (tls-string (if (and (not (elpher-address-about-p address)) (member (elpher-address-protocol address) '("gophers" "gemini"))) " [TLS encryption]" "")) - (header (concat display-string + (header (concat sanitized-display-string (propertize tls-string 'face 'bold)))) (setq header-line-format header))))