mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[processing][gdal] ";" characters must be escaped when running gdal
commands
This commit is contained in:
parent
2a8867f970
commit
ea113cbf4a
@ -250,7 +250,7 @@ class GdalUtils:
|
||||
|
||||
@staticmethod
|
||||
def escapeAndJoin(strList):
|
||||
escChars = [' ', '&', '(', ')', '"']
|
||||
escChars = [' ', '&', '(', ')', '"', ';']
|
||||
joined = ''
|
||||
for s in strList:
|
||||
if not isinstance(s, str):
|
||||
|
@ -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__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user