From: MORIOKA Tomohiko Date: Thu, 20 Dec 2018 08:26:26 +0000 (+0800) Subject: (www-display-feature-desc): Fix problem when uri-object is not X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6150031d1a584a1da6f3ef031fc7622d77205ef;p=chise%2Fest.git (www-display-feature-desc): Fix problem when uri-object is not specified; fix problem when property `description' is not defined in the target feature. --- diff --git a/cwiki-view.el b/cwiki-view.el index fe4586f..a24b220 100644 --- a/cwiki-view.el +++ b/cwiki-view.el @@ -538,14 +538,15 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />" (defun www-display-feature-desc (uri-feature-name genre uri-object &optional lang simple) (let ((rdf-uri-object (if est-hide-cgi-mode - (if (string-match "=" uri-object) - (concat - (est-uri-decode-feature-name-body - (substring uri-object 0 (match-beginning 0))) - ":" - (est-uri-decode-feature-name-body - (substring uri-object (match-end 0)))) - uri-object))) + (if (and uri-object + (string-match "=" uri-object) + (concat + (est-uri-decode-feature-name-body + (substring uri-object 0 (match-beginning 0))) + ":" + (est-uri-decode-feature-name-body + (substring uri-object (match-end 0))))) + uri-object))) (feature-name (www-uri-decode-feature-name uri-feature-name)) (name@lang (intern (format "name@%s" lang)))) (princ @@ -683,7 +684,8 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />" (www-html-display-paragraph (format "description : %s" (or (decode-coding-string - (char-feature-property feature-name 'description) + (or (char-feature-property feature-name 'description) + "") 'utf-8-mcs-er) ""))) (when lang