require 'rexml/text'
require 'xml/libxml'
require 'digest/md5'
- require 'RMagick'
require 'nokogiri'
if defined?(SystemTimer)
link_count = 0
link_size = 0
- doc = Nokogiri::HTML(text)
+ doc = Nokogiri::HTML(Rinku.auto_link(text, :urls))
if doc.content.length > 0
doc.xpath("//a").each do |link|