[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] emacs-wiki-publish: bug in escape-html-string funct
From: |
Jim Ottaway |
Subject: |
[emacs-wiki-discuss] emacs-wiki-publish: bug in escape-html-string function |
Date: |
Fri, 21 Jan 2005 16:19:09 +0000 |
User-agent: |
Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.2 (gnu/linux) |
The function `emacs-wiki-escape-html-string' occasionally throws an
error: "Wrong type argument: integerp, nil"; here is a fixed version.
Regards,
Jim Ottaway
--- orig/emacs-wiki-publish.el
+++ mod/emacs-wiki-publish.el
@@ -1258,12 +1258,12 @@
(when str
(let (pos code len char)
(save-match-data
- (while (setq pos (string-match
- (concat "[^-"
- emacs-wiki-regexp-alnum
- "/:address@hidden")
- str pos)
- char (aref str pos))
+ (while (and (setq pos (string-match
+ (concat "[^-"
+ emacs-wiki-regexp-alnum
+ "/:address@hidden")
+ str pos))
+ (setq char (aref str pos)))
;; Work around XEmacs differentiation of char and int
(setq code (int-to-string
(cond ((fboundp 'char-to-ucs)
--
Jim Ottaway
- [emacs-wiki-discuss] emacs-wiki-publish: bug in escape-html-string function,
Jim Ottaway <=