(www-display-object-desc): Fix problem about "&GT-...;" in input boxes
[chise/est.git] / cwiki-view.el
index a148dfb..e868df9 100644 (file)
@@ -461,56 +461,45 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)</p>
           "<p>\n"
         "<li>\n"))
       (when (eq genre 'character)
-       (princ
-        "<form action=\"http://www.chise.org/ids-find\">\n")
-       (princ
-        (www-format-encode-string
-         (est-format-object object)
-         ;; (if (eq genre 'character)
-         ;;     (format "%c" object)
-         ;;   (format "%s" (concord-object-id object)))
-         ))
-       (princ
-        (format
-         " <input type=\"text\" name=\"components\"
+       (let ((object-str (est-format-object object))
+             encoded-object-for-form)
+         (princ
+          "<form action=\"http://www.chise.org/ids-find\">\n")
+         (princ (www-format-encode-string object-str))
+         (setq encoded-object-for-form
+               (with-temp-buffer
+                 (insert (encode-coding-string object-str 'utf-8-jp-er))
+                 (goto-char (point-min))
+                 (while (search-forward "&GT-" nil t)
+                   (replace-match "&amp;GT-" t t)
+                   )
+                 (buffer-string)))
+         (princ
+          (format
+           " <input type=\"text\" name=\"components\"
 size=\"30\" maxlength=\"30\" value=\"%s\" />"
-         (encode-coding-string
-          (est-format-object object)
-          ;; (if (eq genre 'character)
-          ;;     (char-to-string object)
-          ;;   (format "%s" (concord-object-id object)))
-          'utf-8-jp-er)))
-       (princ
-        (www-format-encode-string
-         "を\u542Bむ\u6F22\u5B57を\u63A2す"))
-       (princ " <input type=\"submit\" value=\"search\" />\n")
-       (princ "</form>\n")
+           encoded-object-for-form))
+         (princ
+          (www-format-encode-string
+           "を\u542Bむ\u6F22\u5B57を\u63A2す"))
+         (princ " <input type=\"submit\" value=\"search\" />\n")
+         (princ "</form>\n")
 
-       (princ
-        "<form action=\"http://www.chise.org/hng-ids-find\">\n")
-       (princ
-        (www-format-encode-string
-         (est-format-object object)
-         ;; (if (eq genre 'character)
-         ;;     (format "%c" object)
-         ;;   (format "%s" (concord-object-id object)))
-         ))
-       (princ
-        (format
-         " <input type=\"text\" name=\"components\"
+         (princ
+          "<form action=\"http://www.chise.org/hng-ids-find\">\n")
+         (princ (www-format-encode-string object-str))
+
+         (princ
+          (format
+           " <input type=\"text\" name=\"components\"
 size=\"30\" maxlength=\"30\" value=\"%s\" />"
-         (encode-coding-string
-          (est-format-object object)
-          ;; (if (eq genre 'character)
-          ;;     (char-to-string object)
-          ;;   (format "%s" (concord-object-id object)))
-          'utf-8-jp-er)))
-       (princ
-        (www-format-encode-string
-         "を\u542Bむ HNG の\u6F22\u5B57を\u63A2す"))
-       (princ " <input type=\"submit\" value=\"search\" />\n")
-       (princ "</form>\n")
-       )
+           encoded-object-for-form))
+         (princ
+          (www-format-encode-string
+           "を\u542Bむ HNG の\u6F22\u5B57を\u63A2す"))
+         (princ " <input type=\"submit\" value=\"search\" />\n")
+         (princ "</form>\n")
+       ))
       (princ
        (if (= level 1)
           "</p>\n"