@@ -212,7 +212,7 @@ def dbTables(self, dbTables):
212212 if table and isListLike (table ):
213213 table = table [0 ]
214214
215- maxlength = max (maxlength , len (normalizeUnicode (table ) or str (table )))
215+ maxlength = max (maxlength , len (unsafeSQLIdentificatorNaming ( normalizeUnicode (table ) or str (table ) )))
216216
217217 lines = "-" * (int (maxlength ) + 2 )
218218
@@ -232,6 +232,7 @@ def dbTables(self, dbTables):
232232 if table and isListLike (table ):
233233 table = table [0 ]
234234
235+ table = unsafeSQLIdentificatorNaming (table )
235236 blank = " " * (maxlength - len (normalizeUnicode (table ) or str (table )))
236237 self ._write ("| %s%s |" % (table , blank ))
237238
@@ -263,6 +264,7 @@ def dbTableColumns(self, tableColumns, content_type=None):
263264 for column in colList :
264265 colType = columns [column ]
265266
267+ column = unsafeSQLIdentificatorNaming (column )
266268 maxlength1 = max (maxlength1 , len (column or "" ))
267269 maxlength2 = max (maxlength2 , len (colType or "" ))
268270
@@ -299,6 +301,8 @@ def dbTableColumns(self, tableColumns, content_type=None):
299301
300302 for column in colList :
301303 colType = columns [column ]
304+
305+ column = unsafeSQLIdentificatorNaming (column )
302306 blank1 = " " * (maxlength1 - len (column ))
303307
304308 if colType is not None :
0 commit comments