101f160
--- wwwroot/cgi-bin/awstats.pl	2007/07/07 11:00:05	1.892
101f160
+++ wwwroot/cgi-bin/awstats.pl	2007/07/12 21:38:20	1.894
101f160
@@ -2211,7 +2211,7 @@
101f160
 			}
101f160
 
101f160
 			# Analyze fields
101f160
-			@field=split(/\s+/,($readxml?CleanFromTags($_):$_));
101f160
+			@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_));
101f160
 			if (! $field[0]) { next; }
101f160
 
101f160
 			# Here version MUST be defined
101f160
@@ -2282,7 +2282,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_MISC' || $field[0] eq "${xmleb}END_MISC" || ! $_);
101f160
 				if ($field[0] ne 'END_MISC' && $field[0] ne "${xmleb}END_MISC") { error("History file \"$filetoread\" is corrupted (End of section MISC not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2313,7 +2313,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_CLUSTER' || $field[0] eq "${xmleb}END_CLUSTER" || ! $_);
101f160
 				if ($field[0] ne 'END_CLUSTER' && $field[0] ne "${xmleb}END_CLUSTER") { error("History file \"$filetoread\" is corrupted (End of section CLUSTER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2357,7 +2357,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_TIME' || $field[0] eq "${xmleb}END_TIME" || ! $_);
101f160
 				if ($field[0] ne 'END_TIME' && $field[0] ne "${xmleb}END_TIME") { error("History file \"$filetoread\" is corrupted (End of section TIME not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2396,7 +2396,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_ORIGIN' || $field[0] eq "${xmleb}END_ORIGIN" || ! $_);
101f160
 				if ($field[0] ne 'END_ORIGIN' && $field[0] ne "${xmleb}END_ORIGIN") { error("History file \"$filetoread\" is corrupted (End of section ORIGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2427,7 +2427,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_DAY' || $field[0] eq "${xmleb}END_DAY" || ! $_);
101f160
 				if ($field[0] ne 'END_DAY' && $field[0] ne "${xmleb}END_DAY") { error("History file \"$filetoread\" is corrupted (End of section DAY not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2534,7 +2534,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_VISITOR' || $field[0] eq "${xmleb}END_VISITOR" || ! $_);
101f160
 				if ($field[0] ne 'END_VISITOR' && $field[0] ne "${xmleb}END_VISITOR") { error("History file \"$filetoread\" is corrupted (End of section VISITOR not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2564,7 +2564,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_UNKNOWNIP' || $field[0] eq "${xmleb}END_UNKNOWNIP" || ! $_);
101f160
 				if ($field[0] ne 'END_UNKNOWNIP' && $field[0] ne "${xmleb}END_UNKNOWNIP") { error("History file \"$filetoread\" is corrupted (End of section UNKOWNIP not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2602,7 +2602,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_LOGIN' || $field[0] eq "${xmleb}END_LOGIN" || ! $_);
101f160
 				if ($field[0] ne 'END_LOGIN' && $field[0] ne "${xmleb}END_LOGIN") { error("History file \"$filetoread\" is corrupted (End of section LOGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2632,7 +2632,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_DOMAIN' || $field[0] eq "${xmleb}END_DOMAIN" || ! $_);
101f160
 				if ($field[0] ne 'END_DOMAIN' && $field[0] ne "${xmleb}END_DOMAIN") { error("History file \"$filetoread\" is corrupted (End of section DOMAIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2660,7 +2660,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_SESSION' || $field[0] eq "${xmleb}END_SESSION" || ! $_);
101f160
 				if ($field[0] ne 'END_SESSION' && $field[0] ne "${xmleb}END_SESSION") { error("History file \"$filetoread\" is corrupted (End of section SESSION not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2689,7 +2689,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_OS' || $field[0] eq "${xmleb}END_OS" || ! $_);
101f160
 				if ($field[0] ne 'END_OS' && $field[0] ne "${xmleb}END_OS") { error("History file \"$filetoread\" is corrupted (End of section OS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2717,7 +2717,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_BROWSER' || $field[0] eq "${xmleb}END_BROWSER" || ! $_);
101f160
 				if ($field[0] ne 'END_BROWSER' && $field[0] ne "${xmleb}END_BROWSER") { error("History file \"$filetoread\" is corrupted (End of section BROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2745,7 +2745,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_UNKNOWNREFERER' || $field[0] eq "${xmleb}END_UNKNOWNREFERER" || ! $_);
101f160
 				if ($field[0] ne 'END_UNKNOWNREFERER' && $field[0] ne "${xmleb}END_UNKNOWNREFERER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2773,7 +2773,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_UNKNOWNREFERERBROWSER' || $field[0] eq "${xmleb}END_UNKNOWNREFERERBROWSER" || ! $_);
101f160
 				if ($field[0] ne 'END_UNKNOWNREFERERBROWSER' && $field[0] ne "${xmleb}END_UNKNOWNREFERERBROWSER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERERBROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2801,7 +2801,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_SCREENSIZE' || $field[0] eq "${xmleb}END_SCREENSIZE" || ! $_);
101f160
 				if ($field[0] ne 'END_SCREENSIZE' && $field[0] ne "${xmleb}END_SCREENSIZE") { error("History file \"$filetoread\" is corrupted (End of section SCREENSIZE not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2832,7 +2832,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_ROBOT' || $field[0] eq "${xmleb}END_ROBOT" || ! $_);
101f160
 				if ($field[0] ne 'END_ROBOT' && $field[0] ne "${xmleb}END_ROBOT") { error("History file \"$filetoread\" is corrupted (End of section ROBOT not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2862,7 +2862,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_WORMS' || $field[0] eq "${xmleb}END_WORMS" || ! $_);
101f160
 				if ($field[0] ne 'END_WORMS' && $field[0] ne "${xmleb}END_WORMS") { error("History file \"$filetoread\" is corrupted (End of section WORMS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2892,7 +2892,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_EMAILSENDER' || $field[0] eq "${xmleb}END_EMAILSENDER" || ! $_);
101f160
 				if ($field[0] ne 'END_EMAILSENDER' && $field[0] ne "${xmleb}END_EMAILSENDER") { error("History file \"$filetoread\" is corrupted (End of section EMAILSENDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2922,7 +2922,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_EMAILRECEIVER' || $field[0] eq "${xmleb}END_EMAILRECEIVER" || ! $_);
101f160
 				if ($field[0] ne 'END_EMAILRECEIVER' && $field[0] ne "${xmleb}END_EMAILRECEIVER") { error("History file \"$filetoread\" is corrupted (End of section EMAILRECEIVER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -2984,7 +2984,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_SIDER' || $field[0] eq "${xmleb}END_SIDER" || ! $_);
101f160
 				if ($field[0] ne 'END_SIDER' && $field[0] ne "${xmleb}END_SIDER") { error("History file \"$filetoread\" is corrupted (End of section SIDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3016,7 +3016,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_FILETYPES' || $field[0] eq "${xmleb}END_FILETYPES" || ! $_);
101f160
 				if ($field[0] ne 'END_FILETYPES' && $field[0] ne "${xmleb}END_FILETYPES") { error("History file \"$filetoread\" is corrupted (End of section FILETYPES not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3066,7 +3066,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_SEREFERRALS' || $field[0] eq "${xmleb}END_SEREFERRALS" || ! $_);
101f160
 				if ($field[0] ne 'END_SEREFERRALS' && $field[0] ne "${xmleb}END_SEREFERRALS") { error("History file \"$filetoread\" is corrupted (End of section SEREFERRALS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3109,7 +3109,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_PAGEREFS' || $field[0] eq "${xmleb}END_PAGEREFS" || ! $_);
101f160
 				if ($field[0] ne 'END_PAGEREFS' && $field[0] ne "${xmleb}END_PAGEREFS") { error("History file \"$filetoread\" is corrupted (End of section PAGEREFS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3173,7 +3173,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_SEARCHWORDS' || $field[0] eq "${xmleb}END_SEARCHWORDS" || ! $_);
101f160
 				if ($field[0] ne 'END_SEARCHWORDS' && $field[0] ne "${xmleb}END_SEARCHWORDS") { error("History file \"$filetoread\" is corrupted (End of section SEARCHWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3210,7 +3210,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_KEYWORDS' || $field[0] eq "${xmleb}END_KEYWORDS" || ! $_);
101f160
 				if ($field[0] ne 'END_KEYWORDS' && $field[0] ne "${xmleb}END_KEYWORDS") { error("History file \"$filetoread\" is corrupted (End of section KEYWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3239,7 +3239,7 @@
101f160
 					}
101f160
 					$_=<HISTORY>;
101f160
 					chomp $_; s/\r//;
101f160
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 				}
101f160
 				until ($field[0] eq 'END_ERRORS' || $field[0] eq "${xmleb}END_ERRORS" || ! $_);
101f160
 				if ($field[0] ne 'END_ERRORS' && $field[0] ne "${xmleb}END_ERRORS") { error("History file \"$filetoread\" is corrupted (End of section ERRORS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3271,7 +3271,7 @@
101f160
 						}
101f160
 						$_=<HISTORY>;
101f160
 						chomp $_; s/\r//;
101f160
-						@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+						@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 					}
101f160
 					until ($field[0] eq "END_SIDER_$code" || $field[0] eq "${xmleb}END_SIDER_$code" || ! $_);
101f160
 					if ($field[0] ne "END_SIDER_$code" && $field[0] ne "${xmleb}END_SIDER_$code") { error("History file \"$filetoread\" is corrupted (End of section SIDER_$code not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3304,7 +3304,7 @@
101f160
 						}
101f160
 						$_=<HISTORY>;
101f160
 						chomp $_; s/\r//;
101f160
-						@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+						@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 					}
101f160
 					until ($field[0] eq "END_EXTRA_$extranum" || $field[0] eq "${xmleb}END_EXTRA_$extranum" || ! $_);
101f160
 					if ($field[0] ne "END_EXTRA_$extranum" && $field[0] ne "${xmleb}END_EXTRA_$extranum") { error("History file \"$filetoread\" is corrupted (End of section EXTRA_$extranum not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
101f160
@@ -3352,7 +3352,7 @@
101f160
 					do {
101f160
 						$_=<HISTORY>;
101f160
 						chomp $_; s/\r//;
101f160
-						@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
101f160
+						@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
101f160
 					}
101f160
 					until ($field[0] eq "END_PLUGIN_$pluginname" || $field[0] eq "${xmleb}END_PLUGIN_$pluginname" || ! $_);
101f160
    				}
101f160
@@ -3811,13 +3811,13 @@
101f160
 			$keysinkeylist{$_}=1;
101f160
 			my $newkey=$_;
101f160
 			$newkey =~ s/([^:])\/\//$1\//g;		# Because some targeted url were taped with 2 / (Ex: //rep//file.htm). We must keep http://rep/file.htm
101f160
-			print HISTORYTMP "${xmlrb}$newkey${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
101f160
+			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($newkey)."${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
101f160
 		}
101f160
 		foreach (keys %_url_p) {
101f160
 			if ($keysinkeylist{$_}) { next; }
101f160
 			my $newkey=$_;
101f160
 			$newkey =~ s/([^:])\/\//$1\//g;		# Because some targeted url were taped with 2 / (Ex: //rep//file.htm). We must keep http://rep/file.htm
101f160
-			print HISTORYTMP "${xmlrb}$newkey ".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
101f160
+			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($newkey)."${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
101f160
 		}
101f160
 		print HISTORYTMP "${xmleb}END_SIDER${xmlee}\n";
101f160
 	}
101f160
@@ -4340,7 +4340,8 @@
101f160
 }
101f160
 
101f160
 #------------------------------------------------------------------------------
101f160
-# Function:		Transforms spaces into %20 and special chars by entities as needed in XML/XHTML
101f160
+# Function:		Transforms spaces into %20 and special chars by HTML entities as needed in XML/XHTML
101f160
+#				Decoding is done by XMLDecodeFromHisto
101f160
 # Parameters:	stringtoencode
101f160
 # Return:		encodedstring
101f160
 #------------------------------------------------------------------------------
101f160
@@ -4348,6 +4349,7 @@
101f160
 	my $string = shift;
101f160
     $string =~ s/\s/%20/g;
101f160
 	if ($BuildHistoryFormat ne 'xml') { return $string; }
101f160
+	$string =~ s/=/%3d/g;
101f160
 	$string =~ s/&/&/g;
101f160
 	$string =~ s/</</g;
101f160
 	$string =~ s/>/>/g;
101f160
@@ -4445,10 +4447,16 @@
101f160
 # Output:       None
101f160
 # Return:		decodedstring
101f160
 #------------------------------------------------------------------------------
101f160
-sub CleanFromTags {
101f160
+sub XMLDecodeFromHisto {
101f160
 	my $stringtoclean=shift;
101f160
 	$stringtoclean =~ s/$regclean1/ /g;	# Replace <recnb> or  with space
101f160
-	$stringtoclean =~ s/$regclean2//g;	# Remove <xxx>
101f160
+	$stringtoclean =~ s/$regclean2//g;	# Remove others <xxx>
101f160
+	$stringtoclean =~ s/%3d/=/g;
101f160
+	$stringtoclean =~ s/&/&/;;
101f160
+	$stringtoclean =~ s/</
101f160
+	$stringtoclean =~ s/>/>/g;
101f160
+    $stringtoclean =~ s/"/\"/g;
101f160
+    $stringtoclean =~ s/'/\'/g;
101f160
 	return $stringtoclean;
101f160
 }
101f160