summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-03-09 21:11:08 +0100
committerAndras Timar <atimar@suse.com>2012-03-09 21:11:08 +0100
commitfb5e6f36641fbfb1dfe7e84481e17d3c64522162 (patch)
tree6b48018b2226b37897863ad8e7d1081dbc58ffe9
parentmore silent output of non-verbose help build (diff)
downloadhelp-fb5e6f36641fbfb1dfe7e84481e17d3c64522162.tar.gz
help-fb5e6f36641fbfb1dfe7e84481e17d3c64522162.zip
remove bogus \\<.*?\\> help xml tags from tree files
-rw-r--r--helpcontent2/helpers/update_tree.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl
index 3d32772489..ea8e7dae2b 100644
--- a/helpcontent2/helpers/update_tree.pl
+++ b/helpcontent2/helpers/update_tree.pl
@@ -315,9 +315,9 @@ sub readtv {
}
}
-#------------------------------------
-# read entries form localize.sdf files
-#------------------------------------
+#-------------------------------------
+# read entries from localize.sdf files
+#-------------------------------------
sub read_loc {
$/ = "\n";
my $path = "$source_dir/text";
@@ -336,6 +336,8 @@ sub read_loc {
$file =~ s/\\/\//g;
#fpe: i46823 - need to encode &s, added encoding
$text =~ s/&(?!amp;)/&amp;/g;
+ #help xml tags are not allowed in .tree files
+ $text =~ s/\\<.*?\\>//g;
# add entry to the hash
$loc_title{$lang}->{$file} = $text;
}
@@ -351,6 +353,8 @@ sub read_loc {
if( defined $sec_title )
{
$sec_title =~ s/&(?!amp;)/&amp;/g;
+ #help xml tags are not allowed in .tree files
+ $sec_title =~ s/\\<.*?\\>//g;
#unquot \<item ... /\>
terminate( "\n\nERROR: Bad string in file '$fname' will cause invalid xml tree file \n---\n'$sdf_line'\n---\nPlease remove or replace < = '&lt;' and > = '&gt;' within the title attribute '$sec_title'\n") , if( $sec_title =~ /[\<\>]/ );
$helpsection{$lang}->{$id} = $sec_title;
@@ -364,6 +368,8 @@ sub read_loc {
if( defined $node_title )
{
$node_title =~ s/&(?!amp;)/&amp;/g;
+ #help xml tags are not allowed in .tree files
+ $node_title =~ s/\\<.*?\\>//g;
terminate( "\n\nERROR: Bad string in '$fname' will cause invalid xml tree file \n---\n'$sdf_line'\n---\nPlease remove or replace < = '&lt;' and > = '&gt;' within the title attribute '$node_title'\n") , if( $node_title =~ /[\<\>]/ );
}
$node{$lang}->{$id} = $node_title;