Changeset 22614

Show
Ignore:
Timestamp:
11/03/08 14:05:46 (5 years ago)
Author:
hsbt
Message:

fix encoding option.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/util/tdiarysearch/search.rb

    r14972 r22614  
    192192  patterns = split_string(query).map {|pat| 
    193193    check_pattern pat 
    194     /#{Regexp.quote(pat)}/ie 
     194    /#{Regexp.quote(pat)}/iu 
    195195  } 
    196196  raise WrongQuery, 'no pattern' if patterns.empty? 
     
    207207 
    208208def split_string(str) 
    209   str.split(/[\s#{Z_SPACE}]+/oe).reject {|w| w.empty? } 
     209  str.split(/[\s#{Z_SPACE}]+/ou).reject {|w| w.empty? } 
    210210end 
    211211 
     
    381381  when /Comment/ 
    382382    cmt = component 
    383     escape((cmt.name + ': ' + cmt.body).slice(/\A.{0,120}/me)) 
     383    escape((cmt.name + ': ' + cmt.body).slice(/\A.{0,120}/mu)) 
    384384  else 
    385385    raise "must not happen: #{component.class}" 
     
    388388 
    389389def tdiary2text(html) 
    390   apply_tdiary_plugins(html).gsub(%r[<[^>]*>]em, '').slice(/\A.{0,120}/me) 
     390  apply_tdiary_plugins(html).gsub(%r[<[^>]*>]em, '').slice(/\A.{0,120}/mu) 
    391391end 
    392392