(www-format-encode-string): Add setting of
[chise/est.git] / cwiki-view.el
index 217bbbe..e868df9 100644 (file)
@@ -127,6 +127,8 @@ li { margin: 0 0 0 2em; }
     z-index: 1;
 }
 
+.value .image-list img { height: 320px; vertical-align: top; }
+
 .list .tooltip:hover .tooltiptext {
     visibility: visible;
 }
@@ -188,10 +190,14 @@ li { margin: 0 0 0 2em; }
                           genre rdf-uri-object)
                 "")))
       (when (setq parents (www-get-feature-value object '<-denotational))
+       (if (characterp parents)
+           (setq parents (list parents)))
        (princ (format "<p>%s %s</p>\n<hr>\n"
                       (www-format-value-as-char-list parents)
                       (www-format-feature-name '->denotational lang))))
       (when (setq parents (www-get-feature-value object '<-subsumptive))
+       (if (characterp parents)
+           (setq parents (list parents)))
        (princ (format "<p>%s %s</p>\n<hr>\n"
                       (www-format-value-as-char-list parents)
                       (www-format-feature-name '->subsumptive lang))))
@@ -455,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"