ported 257:258 from hidra branch
[webpac] / all2xml.pl
index bc764df..9ed7e4e 100755 (executable)
@@ -292,20 +292,15 @@ sub data2xml {
                                }
                                # type="swish" ; field for swish
                                if ($swish) {
+                                       my $tmp = $swish;
                                        if ($filter && ($s || $se)) {
                                                no strict 'refs';
-                                               my $tmp = join(" ",&$filter($swish)) if ($s || $se);
-                                               $swish_data .= $tmp if ($s);
-                                               $swish_exact_data .= "xxbxx $tmp xxexx " if ($se && $tmp ne "");
-
-                                       } else {
-                                               $swish_data .= $swish if ($s);
-                                               $swish_exact_data .= "xxbxx $swish xxexx " if ($se && $swish ne "");
+                                               $tmp = join(" ",&$filter($tmp)) if ($s || $se);
                                        }
 
                                        $tmp = chk_eval($tmp);
                                        $swish_data .= $tmp if ($s && $tmp);
-                                       $swish_exact_data .= "xxbxx $tmp xxexx " if ($se && $tmp ne "");
+                                       $swish_exact_data .= "xxbxx $tmp xxexx " if ($tmp && $tmp ne "" && $se);
                                }
 
                                # type="display" ; field for display