\w_ replaced with \w, thanks Osman

This commit is contained in:
mdipierro
2012-08-15 09:12:55 -05:00
parent 91c88d56eb
commit f25e92d443
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-08-15 09:06:31) dev
Version 2.00.0 (2012-08-15 09:12:50) dev
+1 -1
View File
@@ -182,7 +182,7 @@ def site():
class IS_VALID_APPNAME(object):
def __call__(self,value):
if not re.compile('[\w_]+').match(value):
if not re.compile('\w+').match(value):
return (value,T('Invalid application name'))
if not request.vars.overwrite and \
os.path.exists(os.path.join(apath(r=request),value)):
+1 -1
View File
@@ -139,7 +139,7 @@ def render(text,
text = regex_noindent.sub('\n\\\\noindent \g<t>',text)
### fix paths in images
regex=re.compile('\\\\_[\w_]*\.(eps|png|jpg|gif)')
regex=re.compile('\\\\_\w*\.(eps|png|jpg|gif)')
while True:
match=regex.search(text)
if not match: break
+3 -3
View File
@@ -210,12 +210,12 @@ sql_locker = threading.RLock()
thread = threading.local()
# internal representation of tables with field
# <table>.<field>, tables and fields may only be [a-zA-Z0-0_]
# <table>.<field>, tables and fields may only be [a-zA-Z0-9_]
regex_type = re.compile('^([\w\_\:]+)')
regex_dbname = re.compile('^(\w+)(\:\w+)*')
regex_safe = re.compile('^[\w_]+$')
regex_table_field = re.compile('^([\w_]+)\.([\w_]+)$')
regex_safe = re.compile('^\w+$')
regex_table_field = re.compile('^(\w+)\.(\w+)$')
regex_content = re.compile('(?P<table>[\w\-]+)\.(?P<field>[\w\-]+)\.(?P<uuidkey>[\w\-]+)\.(?P<name>\w+)\.\w+$')
regex_cleanup_fn = re.compile('[\'"\s;]+')
string_unpack=re.compile('(?<!\|)\|(?!\|)')
+1 -1
View File
@@ -12,7 +12,7 @@ import re
# pattern to find defined tables
regex_tables = re.compile(\
"""^[\w]+\.define_table\(\s*[\'\"](?P<name>[\w_]+)[\'\"]""",
"""^[\w]+\.define_table\(\s*[\'\"](?P<name>\w+)[\'\"]""",
flags=re.M)
# pattern to find exposed functions in controller
+1 -1
View File
@@ -381,7 +381,7 @@ class IS_IN_SET(Validator):
return (value, None)
regex1 = re.compile('[\w_]+\.[\w_]+')
regex1 = re.compile('\w+\.\w+')
regex2 = re.compile('%\((?P<name>[^\)]+)\)s')