Skip to content
Snippets Groups Projects
Commit 6cf0c602 authored by Erik von Reis's avatar Erik von Reis
Browse files

RCG: Remove html tags from all annotations

Except <br/> tags are replaced with newlines.
parent 0c4685b9
No related branches found
No related tags found
1 merge request!279RCG: Remove html tags from all annotations
......@@ -127,6 +127,12 @@ sub parse {
# print_node($cur_node);
${$parent->{CHILD_BLOCKS}}{$name} = $cur_node;
}
elsif ($cur_node->{NAME} eq "Annotation" && exists ${$cur_node->{FIELDS}}{Name}) {
my $clean_name = ${$cur_node->{FIELDS}}{Name};
$clean_name =~ s/<[bB][rR]\/>/\\n/g;
$clean_name =~ s/<[^>]*>//g;
${$cur_node->{FIELDS}}{Name} = $clean_name;
}
#print " " x scalar @blocks; print "Block $bn ends on $lcntr\n";
} else { # This is block field
# Get current node
......@@ -1675,7 +1681,7 @@ sub process {
my $science = "";
my $egu = "";
next if ($i =~ "^#");
next if ($i =~ "^\s*#");
my @nr = split(/\s+/, $i);
next unless length $nr[0];
my $pn = $prefix . $nr[0];
......
......@@ -106,7 +106,7 @@ sub find_node {
# Find all DAQ channel Annotations
sub find_daq_annotation {
my($tree) = @_;
if ($tree->{NAME} eq "Annotation" && ${$tree->{FIELDS}}{Name} =~ /^#\s*[dD][aA][qQ]\s+[cC]hannels/) {
if ($tree->{NAME} eq "Annotation" && ${$tree->{FIELDS}}{Name} =~ /^\s*#\s*[dD][aA][qQ]\s+[cC]hannels/) {
return ($tree, "");
} else {
for (@{$tree->{NEXT}}) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment