/[swish]/trunk/spider/filter.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/spider/filter.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 46 by dpavlin, Sat Jan 17 23:57:55 2004 UTC revision 51 by dpavlin, Tue Jan 20 18:40:06 2004 UTC
# Line 8  sub filter { Line 8  sub filter {
8          $contents =~ s,<!--\s*noindex\s*-->.+?<!--\s*/noindex\s*-->,,isg;          $contents =~ s,<!--\s*noindex\s*-->.+?<!--\s*/noindex\s*-->,,isg;
9          $contents =~ s,<!--\s*noindex\s*-->.+?<!--\s*index\s*-->,,isg;          $contents =~ s,<!--\s*noindex\s*-->.+?<!--\s*index\s*-->,,isg;
10          # this will remove all script from indexing content          # this will remove all script from indexing content
11          $contents =~ s,<script>.+?</script>,,isg;          $contents =~ s,<script[^>]*>.+?</script>,,isg;
12          # remap Windows charset to ISO-8859-2          # remap Windows charset to ISO-8859-2
13          $contents =~ tr/šðžèæŠÐŽÈÆ/¹ð¾èæ©Ð®ÈÆ/; # 1250 -> iso8859-2          $contents =~ tr/šðžèæŠÐŽÈÆ/¹ð¾èæ©Ð®ÈÆ/; # 1250 -> iso8859-2
14          # this will fix badly formatted html in form:          # this will fix badly formatted html in form:
# Line 36  sub filter { Line 36  sub filter {
36                  $contents =~ s,(<title>)([^<]+)(</title>),$1$2: $title$3,gsi if ($title);                  $contents =~ s,(<title>)([^<]+)(</title>),$1$2: $title$3,gsi if ($title);
37    
38          }          }
39    
40          return $contents;          return $contents;
41  }  }
42    

Legend:
Removed from v.46  
changed lines
  Added in v.51

  ViewVC Help
Powered by ViewVC 1.1.26