… | |
… | |
9 | use CFPlus::DB; |
9 | use CFPlus::DB; |
10 | use CFPlus::UI; |
10 | use CFPlus::UI; |
11 | use CFPlus::Pod; |
11 | use CFPlus::Pod; |
12 | use CFPlus::Macro; |
12 | use CFPlus::Macro; |
13 | use CFPlus::Item; |
13 | use CFPlus::Item; |
14 | |
|
|
15 | use Crossfire::Protocol::Base 0.95; |
|
|
16 | |
14 | |
17 | use base 'Crossfire::Protocol::Base'; |
15 | use base 'Crossfire::Protocol::Base'; |
18 | |
16 | |
19 | sub new { |
17 | sub new { |
20 | my ($class, %arg) = @_; |
18 | my ($class, %arg) = @_; |
… | |
… | |
969 | |
967 | |
970 | sub sanitise_xml($) { |
968 | sub sanitise_xml($) { |
971 | local $_ = shift; |
969 | local $_ = shift; |
972 | |
970 | |
973 | # we now weed out all tags we do not support |
971 | # we now weed out all tags we do not support |
974 | s%<(?!/?i>|/?u>|/?b>|fg |/fg>)%<%g; |
972 | s{ <(?! /?i> | /?u> | /?b> | /?big | /?small | /?s | /?tt | fg\ | /fg>) |
|
|
973 | }{ |
|
|
974 | "<" |
|
|
975 | }gex; |
|
|
976 | |
975 | # now all entities |
977 | # now all entities |
976 | s/&(?!amp;|lt;|gt;|apos;|quot;|#[0-9]+;|#x[0-9a-fA-F]+;)/&/g; |
978 | s/&(?!amp;|lt;|gt;|apos;|quot;|#[0-9]+;|#x[0-9a-fA-F]+;)/&/g; |
977 | |
979 | |
978 | # handle some elements |
980 | # handle some elements |
979 | s/<fg name='([^']*)'>(.*?)<\/fg>/<span foreground='$1'>$2<\/span>/gs; |
981 | s/<fg name='([^']*)'>(.*?)<\/fg>/<span foreground='$1'>$2<\/span>/gs; |
… | |
… | |
1053 | $self->{statusbox}->add ($text, |
1055 | $self->{statusbox}->add ($text, |
1054 | group => $text, |
1056 | group => $text, |
1055 | fg => $fg, |
1057 | fg => $fg, |
1056 | timeout => $color >= 2 ? 180 : 10, |
1058 | timeout => $color >= 2 ? 180 : 10, |
1057 | tooltip_font => $::FONT_FIXED, |
1059 | tooltip_font => $::FONT_FIXED, |
1058 | ); |
1060 | ) if $type eq "info"; |
1059 | } |
1061 | } |
1060 | } |
1062 | } |
1061 | |
1063 | |
1062 | sub spell_add { |
1064 | sub spell_add { |
1063 | my ($self, $spell) = @_; |
1065 | my ($self, $spell) = @_; |