emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/htmlize 97b6b8d 078/134: Escape link text.


From: ELPA Syncer
Subject: [nongnu] elpa/htmlize 97b6b8d 078/134: Escape link text.
Date: Sat, 7 Aug 2021 09:17:11 -0400 (EDT)

branch: elpa/htmlize
commit 97b6b8dd5daebf4bd8589c8d8bb6dd393d77b9b1
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>

    Escape link text.
---
 htmlize.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/htmlize.el b/htmlize.el
index 7aebd03..73c5940 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -471,10 +471,11 @@ next-single-char-property-change")))
 (defun htmlize-format-link (linkprops text)
   (let ((uri (if (stringp linkprops)
                  linkprops
-               (plist-get linkprops :uri))))
+               (plist-get linkprops :uri)))
+        (escaped-text (htmlize-protect-string text)))
     (if uri
-        (format "<a href=\"%s\">%s</a>" (htmlize-attr-escape uri) text)
-      (htmlize-protect-string text))))
+        (format "<a href=\"%s\">%s</a>" (htmlize-attr-escape uri) escaped-text)
+      escaped-text)))
 
 (defun htmlize-escape-or-link (string)
   ;; Escape STRING and/or add hyperlinks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]