Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1c8e39fa
Commit
1c8e39fa
authored
Apr 28, 2001
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed regex screwups (replaced \0 with \000).
parent
473cf348
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
lib/python/DocumentTemplate/DT_HTML.py
lib/python/DocumentTemplate/DT_HTML.py
+3
-3
lib/python/DocumentTemplate/DT_Let.py
lib/python/DocumentTemplate/DT_Let.py
+3
-5
lib/python/DocumentTemplate/DT_Util.py
lib/python/DocumentTemplate/DT_Util.py
+6
-6
No files found.
lib/python/DocumentTemplate/DT_HTML.py
View file @
1c8e39fa
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""HTML formated DocumentTemplates
"""HTML formated DocumentTemplates
$Id: DT_HTML.py,v 1.2
5 2001/04/27 18:07:09 andreas
Exp $"""
$Id: DT_HTML.py,v 1.2
6 2001/04/28 04:59:13 chrism
Exp $"""
from
DT_String
import
String
,
FileMixin
from
DT_String
import
String
,
FileMixin
import
DT_String
,
re
import
DT_String
,
re
...
@@ -94,8 +94,8 @@ from string import strip, find, split, join, rfind, replace
...
@@ -94,8 +94,8 @@ from string import strip, find, split, join, rfind, replace
class
dtml_re_class
:
class
dtml_re_class
:
""" This needs to be replaced before 2.4. It's a hackaround. """
""" This needs to be replaced before 2.4. It's a hackaround. """
def
search
(
self
,
text
,
start
=
0
,
def
search
(
self
,
text
,
start
=
0
,
name_match
=
re
.
compile
(
r'[\0
- ]*[a-zA-Z]+[\
0- ]*'
).
match
,
name_match
=
re
.
compile
(
r'[\0
00- ]*[a-zA-Z]+[\00
0- ]*'
).
match
,
end_match
=
re
.
compile
(
r'[\0- ]*(/|end)'
,
re
.
I
).
match
,
end_match
=
re
.
compile
(
r'[\0
00
- ]*(/|end)'
,
re
.
I
).
match
,
start_search
=
re
.
compile
(
r'[<&]'
).
search
,
start_search
=
re
.
compile
(
r'[<&]'
).
search
,
ent_name
=
re
.
compile
(
r'[-a-zA-Z0-9_.]+'
).
match
,
ent_name
=
re
.
compile
(
r'[-a-zA-Z0-9_.]+'
).
match
,
find
=
find
,
find
=
find
,
...
...
lib/python/DocumentTemplate/DT_Let.py
View file @
1c8e39fa
...
@@ -154,12 +154,10 @@ class Let:
...
@@ -154,12 +154,10 @@ class Let:
def
parse_let_params
(
text
,
def
parse_let_params
(
text
,
result
=
None
,
result
=
None
,
tag
=
'let'
,
tag
=
'let'
,
parmre
=
re
.
compile
(
parmre
=
re
.
compile
(
r'([\000- ]*([^\000- ="]+)=([^\000- ="]+))'
),
r'([\0- ]*([^\0- =\"]+)=([^\0- =\"]+))'
),
qparmre
=
re
.
compile
(
r'([\000- ]*([^\000- ="]+)="([^"]*)")'
),
qparmre
=
re
.
compile
(
r'([\0- ]*([^\0- =\"]+)="([^"]*)\")'
),
**
parms
):
**
parms
):
result
=
result
or
[]
result
=
result
or
[]
mo
=
parmre
.
match
(
text
)
mo
=
parmre
.
match
(
text
)
...
...
lib/python/DocumentTemplate/DT_Util.py
View file @
1c8e39fa
...
@@ -82,8 +82,8 @@
...
@@ -82,8 +82,8 @@
# attributions are listed in the accompanying credits file.
# attributions are listed in the accompanying credits file.
#
#
##############################################################################
##############################################################################
'''$Id: DT_Util.py,v 1.7
4 2001/04/27 20:27:39 shane
Exp $'''
'''$Id: DT_Util.py,v 1.7
5 2001/04/28 04:58:53 chrism
Exp $'''
__version__
=
'$Revision: 1.7
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.7
5
$'
[
11
:
-
2
]
import
re
,
os
import
re
,
os
from
string
import
lower
from
string
import
lower
...
@@ -340,13 +340,13 @@ def parse_params(text,
...
@@ -340,13 +340,13 @@ def parse_params(text,
result
=
None
,
result
=
None
,
tag
=
''
,
tag
=
''
,
unparmre
=
re
.
compile
(
unparmre
=
re
.
compile
(
r'([\0
- ]*([^\0- =\
"]+))'
),
r'([\0
00- ]*([^\000- =
"]+))'
),
qunparmre
=
re
.
compile
(
qunparmre
=
re
.
compile
(
r'([\0- ]*("[^"]*"))'
),
r'([\0
00
- ]*("[^"]*"))'
),
parmre
=
re
.
compile
(
parmre
=
re
.
compile
(
r'([\0
- ]*([^\0- =\"]+)=([^\0- =\
"]+))'
),
r'([\0
00- ]*([^\000- ="]+)=([^\000- =
"]+))'
),
qparmre
=
re
.
compile
(
qparmre
=
re
.
compile
(
r'([\0
- ]*([^\0- =\"]+)="([^"]*)\
")'
),
r'([\0
00- ]*([^\000- ="]+)="([^"]*)
")'
),
**
parms
):
**
parms
):
"""Parse tag parameters
"""Parse tag parameters
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment