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 @@
##############################################################################
"""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
import
DT_String
,
re
...
...
@@ -94,8 +94,8 @@ from string import strip, find, split, join, rfind, replace
class
dtml_re_class
:
""" This needs to be replaced before 2.4. It's a hackaround. """
def
search
(
self
,
text
,
start
=
0
,
name_match
=
re
.
compile
(
r'[\0
- ]*[a-zA-Z]+[\
0- ]*'
).
match
,
end_match
=
re
.
compile
(
r'[\0- ]*(/|end)'
,
re
.
I
).
match
,
name_match
=
re
.
compile
(
r'[\0
00- ]*[a-zA-Z]+[\00
0- ]*'
).
match
,
end_match
=
re
.
compile
(
r'[\0
00
- ]*(/|end)'
,
re
.
I
).
match
,
start_search
=
re
.
compile
(
r'[<&]'
).
search
,
ent_name
=
re
.
compile
(
r'[-a-zA-Z0-9_.]+'
).
match
,
find
=
find
,
...
...
lib/python/DocumentTemplate/DT_Let.py
View file @
1c8e39fa
...
...
@@ -154,12 +154,10 @@ class Let:
def
parse_let_params
(
text
,
result
=
None
,
tag
=
'let'
,
parmre
=
re
.
compile
(
r'([\0- ]*([^\0- =\"]+)=([^\0- =\"]+))'
),
qparmre
=
re
.
compile
(
r'([\0- ]*([^\0- =\"]+)="([^"]*)\")'
),
parmre
=
re
.
compile
(
r'([\000- ]*([^\000- ="]+)=([^\000- ="]+))'
),
qparmre
=
re
.
compile
(
r'([\000- ]*([^\000- ="]+)="([^"]*)")'
),
**
parms
):
result
=
result
or
[]
mo
=
parmre
.
match
(
text
)
...
...
lib/python/DocumentTemplate/DT_Util.py
View file @
1c8e39fa
...
...
@@ -82,8 +82,8 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
'''$Id: DT_Util.py,v 1.7
4 2001/04/27 20:27:39 shane
Exp $'''
__version__
=
'$Revision: 1.7
4
$'
[
11
:
-
2
]
'''$Id: DT_Util.py,v 1.7
5 2001/04/28 04:58:53 chrism
Exp $'''
__version__
=
'$Revision: 1.7
5
$'
[
11
:
-
2
]
import
re
,
os
from
string
import
lower
...
...
@@ -340,13 +340,13 @@ def parse_params(text,
result
=
None
,
tag
=
''
,
unparmre
=
re
.
compile
(
r'([\0
- ]*([^\0- =\
"]+))'
),
r'([\0
00- ]*([^\000- =
"]+))'
),
qunparmre
=
re
.
compile
(
r'([\0- ]*("[^"]*"))'
),
r'([\0
00
- ]*("[^"]*"))'
),
parmre
=
re
.
compile
(
r'([\0
- ]*([^\0- =\"]+)=([^\0- =\
"]+))'
),
r'([\0
00- ]*([^\000- ="]+)=([^\000- =
"]+))'
),
qparmre
=
re
.
compile
(
r'([\0
- ]*([^\0- =\"]+)="([^"]*)\
")'
),
r'([\0
00- ]*([^\000- ="]+)="([^"]*)
")'
),
**
parms
):
"""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