summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--find.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/find.php b/find.php
index bd0fdb3edf..3088a93ac7 100644
--- a/find.php
+++ b/find.php
@@ -582,10 +582,12 @@ if ($type == "facts") {
DefaultTags=[<?php
$firstFact=TRUE;
- foreach($FACTS as $facId => $factName) {
- if($firstFact) $firstFact=FALSE;
- else echo ',';
- echo 'new DefaultTag("'.addslashes($facId).'","'.addslashes($factName).'",preselectedDefaultTags.indexOf("\\x01'.addslashes($facId).'\\x01")>=0)';
+ foreach($FACTS as $factId => $factName) {
+ if (preg_match('/^_?[A-Z0-9]+$/', $factId, $matches)) {
+ if($firstFact) $firstFact=FALSE;
+ else echo ',';
+ echo 'new DefaultTag("'.addslashes($factId).'","'.addslashes($factName).'",preselectedDefaultTags.indexOf("\\x01'.addslashes($factId).'\\x01")>=0)';
+ }
}
?>];
//Sort defined tags alphabetically by name