[Bast-commits] r9948 -
ironman/Perlanet-IronMan/branches/ironboy/lib/Perlanet
idn at dev.catalyst.perl.org
idn at dev.catalyst.perl.org
Sat Sep 22 11:12:37 GMT 2012
Author: idn
Date: 2012-09-22 11:12:36 +0000 (Sat, 22 Sep 2012)
New Revision: 9948
Modified:
ironman/Perlanet-IronMan/branches/ironboy/lib/Perlanet/IronMan.pm
Log:
sync with trunk
Modified: ironman/Perlanet-IronMan/branches/ironboy/lib/Perlanet/IronMan.pm
===================================================================
--- ironman/Perlanet-IronMan/branches/ironboy/lib/Perlanet/IronMan.pm 2012-09-22 11:08:46 UTC (rev 9947)
+++ ironman/Perlanet-IronMan/branches/ironboy/lib/Perlanet/IronMan.pm 2012-09-22 11:12:36 UTC (rev 9948)
@@ -63,34 +63,34 @@
# Definitions for HTML::Scrub
my %scrub_def = (
- '*' => 1, # default rule, allow all attributes
- 'href' => qr{^(?!(?:java)?script)}i,
- 'src' => qr{^(?!(?:java)?script)}i,
- 'cite' => '(?i-xsm:^(?!(?:java)?script))',
- 'language' => 0,
+ '*' => 1, # default rule, allow all attributes
+ 'href' => qr{^(?!(?:java)?script)}i,
+ 'src' => qr{^(?!(?:java)?script)}i,
+ 'cite' => '(?i-xsm:^(?!(?:java)?script))',
+ 'language' => 0,
'name' => 1, # could be sneaky, but hey ;)
'onblur' => 0,
'onchange' => 0,
- 'onclick' => 0,
- 'ondblclick' => 0,
- 'onerror' => 0,
- 'onfocus' => 0,
- 'onkeydown' => 0,
- 'onkeypress' => 0,
- 'onkeyup' => 0,
- 'onload' => 0,
- 'onmousedown' => 0,
- 'onmousemove' => 0,
- 'onmouseout' => 0,
- 'onmouseover' => 0,
- 'onmouseup' => 0,
- 'onreset' => 0,
- 'onselect' => 0,
- 'onsubmit' => 0,
- 'onunload' => 0,
- 'src' => 0,
- 'type' => 0,
- 'style' => 0,
+ 'onclick' => 0,
+ 'ondblclick' => 0,
+ 'onerror' => 0,
+ 'onfocus' => 0,
+ 'onkeydown' => 0,
+ 'onkeypress' => 0,
+ 'onkeyup' => 0,
+ 'onload' => 0,
+ 'onmousedown' => 0,
+ 'onmousemove' => 0,
+ 'onmouseout' => 0,
+ 'onmouseover' => 0,
+ 'onmouseup' => 0,
+ 'onreset' => 0,
+ 'onselect' => 0,
+ 'onsubmit' => 0,
+ 'onunload' => 0,
+ 'src' => 0,
+ 'type' => 0,
+ 'style' => 0,
);
my $scrub = HTML::Scrubber->new;
@@ -179,9 +179,6 @@
my $posts = $post->entries;
- #print(Dumper($posts));
- #exit;
-
foreach my $post (@{$posts}) {
# Set the summary text to the summary or body if not supplied
@@ -197,9 +194,6 @@
$summary = $truncated;
- #print(Dumper($post));
- #exit;
-
# Can't store a post if we can't work out the URL to link to it.
unless(defined($post->_entry->link)) {
print("ERROR. Can't deal with lack of URL returned from XML::Feed::Entry for feed '" . $post->feed->url . "'\n");
@@ -230,9 +224,6 @@
Carp::cluck("ERROR: Post is:\n" . Dumper($post) . "\n");
Carp::cluck("ERROR: Link URL is '" . $post->_entry->link . "'\n");
};
-
- #print(Dumper($post));
-
}
};
@@ -353,21 +344,21 @@
# If tags have been defined, check them.
if(defined($xml_entry->tags)) {
- if(grep(/$filter/i, $xml_entry->tags)) {
+ if(grep(/\b$filter\b/i, $xml_entry->tags)) {
return 1;
}
}
# Check the title if defined
if(defined($xml_entry->title)) {
- if(grep(/$filter/i, $xml_entry->title)) {
+ if(grep(/\b$filter\b/i, $xml_entry->title)) {
return 1;
}
}
# Check the body if defined
if(defined($xml_entry->content->body)) {
- if($xml_entry->content->body =~ m/$filter/i) {
+ if($xml_entry->content->body =~ m/\b$filter\b/i) {
return 1;
}
}
More information about the Bast-commits
mailing list