Also simplify item labels, due to XML limitations

This commit is contained in:
Veronica Berglyd Olsen
2022-04-16 16:44:39 +02:00
parent c9f7fba7dd
commit 048e5faa1f
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ from lxml import etree
from novelwriter.enum import nwItemType, nwItemClass, nwItemLayout
from novelwriter.common import (
checkInt, isHandle, isItemClass, isItemLayout, isItemType
checkInt, isHandle, isItemClass, isItemLayout, isItemType, simplified
)
from novelwriter.constants import nwLabels, nwLists, trConst
@@ -305,7 +305,7 @@ class NWItem():
"""Set the item name.
"""
if isinstance(theName, str):
self._name = theName.strip()
self._name = simplified(theName)
else:
self._name = ""
return