117 |
# protect HTML from wiki modifications |
# protect HTML from wiki modifications |
118 |
sub e { |
sub e { |
119 |
my $t = shift; |
my $t = shift; |
120 |
return 'uri_unescape{' . uri_escape($t) . '}'; |
return 'uri_unescape{' . uri_escape($t, '^a-zA-Z0-9') . '}'; |
121 |
} |
} |
122 |
|
|
123 |
$m =~ s/($escape_re)/$escape{$1}/gs; |
$m =~ s/($escape_re)/$escape{$1}/gs; |
124 |
$m =~ s#($RE{URI}{HTTP})#e(qq{<a href="$1">$1</a>})#egs || |
$m =~ s#($RE{URI}{HTTP})#e(qq{<a href="$1">$1</a>})#egs; |
125 |
$m =~ s#\/(\w+)\/#<i>$1</i>#gs; |
$m =~ s#\/(\w+)\/#<i>$1</i>#gs; |
126 |
$m =~ s#$tag_regex#e(qq{<a href="$url?tag=$1" class="tag">$1</a>})#egs; |
$m =~ s#$tag_regex#e(qq{<a href="$url?tag=$1" class="tag">$1</a>})#egs; |
127 |
$m =~ s#\*(\w+)\*#<b>$1</b>#gs; |
$m =~ s#\*(\w+)\*#<b>$1</b>#gs; |
938 |
stop => qq{ update feeds set active = false where url = ? }, |
stop => qq{ update feeds set active = false where url = ? }, |
939 |
}; |
}; |
940 |
|
|
941 |
if (my $q = $sql->{$command} ) { |
if ( $command eq 'add' && ! $channel ) { |
942 |
|
$res = "ERROR: got '$msg' which doesn't have #channel in it, ignoring!"; |
943 |
|
} elsif (my $q = $sql->{$command} ) { |
944 |
my $sth = $dbh->prepare( $q ); |
my $sth = $dbh->prepare( $q ); |
945 |
my @data = ( $url ); |
my @data = ( $url ); |
946 |
if ( $command eq 'add' ) { |
if ( $command eq 'add' ) { |
956 |
} else { |
} else { |
957 |
$res = "ERROR: don't know what to do with: $msg"; |
$res = "ERROR: don't know what to do with: $msg"; |
958 |
} |
} |
|
|
|
959 |
} |
} |
960 |
|
|
961 |
if ($res) { |
if ($res) { |