diff --git a/AutoBouquetsMaker/src/scanner/frequencyfinder.py b/AutoBouquetsMaker/src/scanner/frequencyfinder.py index 3a4804a9..479c27ac 100644 --- a/AutoBouquetsMaker/src/scanner/frequencyfinder.py +++ b/AutoBouquetsMaker/src/scanner/frequencyfinder.py @@ -502,7 +502,7 @@ def readNIT(self): nit_current_content += section["content"] if 'network_name' in section["header"] and section["header"]["network_name"] != "Unknown": - self.network_name = section["header"]["network_name"] + self.network_name = re.sub(r'&(?![A-Za-z]+[0-9]*;|#[0-9]+;|#x[0-9a-fA-F]+;)', r'&', section["header"]["network_name"]) # regex to avoid unencoded ampersands that are not entities if len(nit_current_sections_read) == nit_current_sections_count: nit_current_completed = True @@ -561,7 +561,7 @@ def saveProviderFile(self): break network_name = self.strongestTransponder["network_name"] customProviderList.append('\n') - customProviderList.append('\t%s terrestrial\n' % re.sub(r'&(?![A-Za-z]+[0-9]*;|#[0-9]+;|#x[0-9a-fA-F]+;)', r'&', network_name)) # regex to avoid unencoded ampersands that are not entities + customProviderList.append('\t%s terrestrial\n' % network_name) customProviderList.append('\tdvbt\n') customProviderList.append('\tlcn\n') customProviderList.append('\t\n')