Skip to content

Commit

Permalink
[frequencyfinder.py] add regex to avoid unencoded ampersands in netwo…
Browse files Browse the repository at this point in the history
…rk_name that are not entities
  • Loading branch information
Huevos committed Oct 24, 2019
1 parent 23edd34 commit 555d56a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AutoBouquetsMaker/src/scanner/frequencyfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import os, errno
import sys
import re

import datetime
import time
Expand Down Expand Up @@ -560,7 +561,7 @@ def saveProviderFile(self):
break
network_name = self.strongestTransponder["network_name"]
customProviderList.append('<provider>\n')
customProviderList.append('\t<name>%s terrestrial</name>\n' % network_name)
customProviderList.append('\t<name>%s terrestrial</name>\n' % re.sub(r'&(?![A-Za-z]+[0-9]*;|#[0-9]+;|#x[0-9a-fA-F]+;)', r'&amp;', network_name)) # regex to avoid unencoded ampersands that are not entities
customProviderList.append('\t<streamtype>dvbt</streamtype>\n')
customProviderList.append('\t<protocol>lcn</protocol>\n')
customProviderList.append('\t<dvbtconfigs>\n')
Expand Down

0 comments on commit 555d56a

Please sign in to comment.