[Logilogi-svn] SF.net SVN: logilogi: [319] projects/ogog/trunk/lib/image_parser.rb
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2007-05-25 12:03:38
|
Revision: 319
http://logilogi.svn.sourceforge.net/logilogi/?rev=319&view=rev
Author: wybow
Date: 2007-05-25 05:03:36 -0700 (Fri, 25 May 2007)
Log Message:
-----------
Added fix for urls with spaces at end or begin.
Modified Paths:
--------------
projects/ogog/trunk/lib/image_parser.rb
Modified: projects/ogog/trunk/lib/image_parser.rb
===================================================================
--- projects/ogog/trunk/lib/image_parser.rb 2007-05-25 11:57:07 UTC (rev 318)
+++ projects/ogog/trunk/lib/image_parser.rb 2007-05-25 12:03:36 UTC (rev 319)
@@ -34,7 +34,7 @@
img_tag.tr!("\n",'')
if img_tag =~ /src=\"(.+?)\"/i or img_tag =~ /src=\'(.+?)\'/i
begin
- @image_urls << URI.parse(Regexp.last_match(1)).to_s
+ @image_urls << URI.parse(Regexp.last_match(1).strip).to_s
if img_tag =~ /title=\"(.+?)\"/i or img_tag =~ /title=\'(.+?)\'/i
@titles << Regexp.last_match(1)
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|