Changeset 20874

Show
Ignore:
Timestamp:
10/07/08 07:41:02 (2 months ago)
Author:
kiyoka
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/oldtype-mode.el

    r20398 r20874  
    2929;; 
    3030;; ChangeLog: 
     31;;   [0.0.8] 
     32;;     1. Fixed bug: illegal ASINCODE of amazon and VIDEOCODE of youtube use for image file creation. 
     33;; 
    3134;;   [0.0.7] 
    3235;;     1. Fixed bug: Added The '-' character to ASINCODE of amazon and VIDEOCODE of youtube. 
     
    5457;; 
    5558;; 
    56 (defconst oldtype-version "0.0.7") 
     59(defconst oldtype-version "0.0.8") 
    5760 
    5861(defconst oldtype-wikiname-face 'oldtype-wikiname-face) 
     
    358361  ;; 
    359362  (defun amazon-asincode-to-url (asincode) 
    360     (format "http://images.amazon.com/images/P/%s.09.MZZZZZZZ_.jpg" asincode)) 
     363    (if (string-match "^[a-zA-Z0-9-]+$" asincode) 
     364        (format "http://images.amazon.com/images/P/%s.09.MZZZZZZZ_.jpg" asincode) 
     365      nil)) 
    361366 
    362367  (defun youtube-video-to-url (videocode) 
    363     (format "http://img.youtube.com/vi/%s/1.jpg" videocode)) 
     368    (if (string-match "^[a-zA-Z0-9-]+$" asincode) 
     369        (format "http://img.youtube.com/vi/%s/1.jpg" videocode) 
     370      nil)) 
    364371 
    365372  (defun code-linep (pos) 
     
    440447                       ((youtube-m amazon-m) 
    441448                        (int-to-string oldtype-image-height-m))))) 
    442                (oldtype-compose-region-with-image beg end oldtype-image-icon-string image-url nil height)) 
     449               (if image-url 
     450                   (oldtype-compose-region-with-image beg end oldtype-image-icon-string image-url nil height))) 
    443451             t) 
    444452