[processing][gdal] ";" characters must be escaped when running gdal

commands
This commit is contained in:
Nyall Dawson 2021-02-26 11:30:49 +10:00
parent 2a8867f970
commit ea113cbf4a
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ class GdalUtils:
@staticmethod
def escapeAndJoin(strList):
escChars = [' ', '&', '(', ')', '"']
escChars = [' ', '&', '(', ')', '"', ';']
joined = ''
for s in strList:
if not isinstance(s, str):

View File

@ -338,7 +338,7 @@ class TestGdalAlgorithms(unittest.TestCase):
self.assertEqual(GdalUtils.gdal_crs_string(QgsCoordinateReferenceSystem('ESRI:102003')), 'ESRI:102003')
def testEscapeAndJoin(self):
self.assertEqual(GdalUtils.escapeAndJoin([1, "a", "a b", "a&b", "a(b)"]), '1 a "a b" "a&b" "a(b)"')
self.assertEqual(GdalUtils.escapeAndJoin([1, "a", "a b", "a&b", "a(b)", ";"]), '1 a "a b" "a&b" "a(b)" ";"')
if __name__ == '__main__':