forked from openlp/openlp
Made modifications according to merge request
This commit is contained in:
parent
1fd08401bf
commit
d4bfda2ade
@ -54,7 +54,7 @@ IMAGES_FILTER = None
|
||||
UNO_CONNECTION_TYPE = u'pipe'
|
||||
#UNO_CONNECTION_TYPE = u'socket'
|
||||
CONTROL_CHARS = re.compile(u'[\x00-\x1F\x7F-\x9F]', re.UNICODE)
|
||||
INVALID_FILE_CHARS = re.compile(u'[\\\/:\*\?"<>\|]', re.UNICODE)
|
||||
INVALID_FILE_CHARS = re.compile(u'[\\\/:\*\?"<>\|\[\]%]', re.UNICODE)
|
||||
VERSION_SPLITTER = re.compile(r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))?')
|
||||
|
||||
class VersionThread(QtCore.QThread):
|
||||
|
@ -29,6 +29,7 @@ import re
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.utils import CONTROL_CHARS
|
||||
from db import Author
|
||||
from ui import SongStrings
|
||||
|
||||
@ -262,7 +263,7 @@ def clean_title(title):
|
||||
Cleans the song title by removing Unicode control chars groups C0 & C1,
|
||||
as well as any trailing spaces
|
||||
"""
|
||||
return re.sub(u'[\x00-\x1F\x7F-\x9F]| +$', u'', title, re.UNICODE)
|
||||
return CONTROL_CHARS.sub(u'', title).rstrip()
|
||||
|
||||
def clean_song(manager, song):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user