Changeset 9986

Show
Ignore:
Timestamp:
04/20/08 15:08:07 (5 years ago)
Author:
hsbt
Message:

platform/tdiary/plugin/hb_footer4sec_js.rb: bugfix. escape uri.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/plugin/hb_footer4sec_js.rb

    r9914 r9986  
    55# 
    66 
    7 def permalink( date, index, escape = true ) 
    8    ymd = date.strftime( "%Y%m%d" ) 
    9    uri = @conf.index.dup 
    10    uri[0, 0] = @conf.base_url unless %r|^https?://|i =~ uri 
    11    uri.gsub!( %r|/\./|, '/' ) 
    12    if escape 
    13       uri + CGI::escape(anchor( "#{ymd}p%02d" % index )) 
    14    else 
    15       uri + anchor( "#{ymd}p%02d" % index ) 
    16    end 
     7def permalink( date, index ) 
     8        ymd = date.strftime( "%Y%m%d" ) 
     9        uri = @conf.index.dup 
     10        uri[0, 0] = @conf.base_url unless %r|^https?://|i =~ uri 
     11        uri.gsub!( %r|/\./|, '/' ) 
     12 
     13        uri + anchor( "#{ymd}p%02d" % index ) 
    1714end 
    1815 
    1916add_section_leave_proc do |date, index| 
    20    unless @conf.mobile_agent? then 
     17        if @mode == 'day' and not bot? and not @conf.mobile_agent? then 
    2118                <<-SCRIPT 
    2219                <script type= "text/javascript">/*<![CDATA[*/ 
     
    2926                <div id="hatena_bookmark_anywhere"></div> 
    3027                SCRIPT 
    31    end 
     28        end 
    3229end 
    33