app/helpers/application_helper.rb
# only use this on content that has already been sanitized or whitelisted.
only use this on content that has already been sanitized or whitelisted.
only use this on content that has already been sanitized or whitelisted .
def process_body_content(item)
    youtube_videos = item.body.scan(/\[youtube:+.+\]|\[googlevideo:+.+\]/)
    out = item.body.dup.gsub(/\[youtube:+.+\]|\[googlevideo:+.+\]/, '')
    unless youtube_videos.empty?
      out << <<-EOB
      <strong>內容包含 #{youtube_videos.size} 則影片連結</strong><br/>
      EOB
      youtube_videos.each do |o|
        out << you_tube_video(o.gsub!(/\[youtube\:|\]|\[googlevideo\:/, ''))
      end
    end
    '<p>' + out + '</p>'
  end
def process_body_content ( item ) youtube_videos = item . body . scan ( / \[ youtube:+.+ \] | \[ googlevideo:+.+ \] / ) out = item . body . dup . gsub ( / \[ youtube:+.+ \] | \[ googlevideo:+.+ \] / , '' ) unless youtube_videos . empty? out << <<-EOB 
      <strong>內容包含 #{youtub e_ videos.size} 則 影 片連結< / strong><br/>
       EOB youtube_videos . each do | o | out << you_tube_video ( o . gsub! ( / \[ youtube \: | \] | \[ googlevideo \: / , '' ) ) end end '<p>' + out + '</p>' end
only use this on content that has already been sanitized or whitelisted.
only use this on content that has already been sanitized or whitelisted .
item
<not_specific>