Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
282611d0
Commit
282611d0
authored
Jan 14, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escape special characters on output.
parent
7a7f5e67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/tools/sgmlconv/esis2sgml.py
Doc/tools/sgmlconv/esis2sgml.py
+4
-2
No files found.
Doc/tools/sgmlconv/esis2sgml.py
View file @
282611d0
...
...
@@ -12,13 +12,15 @@ import esistools
import
re
import
string
from
xml.utils
import
escape
def
format_attrs
(
attrs
):
attrs
=
attrs
.
items
()
attrs
.
sort
()
s
=
''
for
name
,
value
in
attrs
:
s
=
'%s %s="%s"'
%
(
s
,
name
,
value
)
s
=
'%s %s="%s"'
%
(
s
,
name
,
escape
(
value
)
)
return
s
...
...
@@ -39,7 +41,7 @@ def do_convert(ifp, ofp, xml=0):
data
=
data
[:
-
1
]
if
type
==
"-"
:
data
=
esistools
.
decode
(
data
)
ofp
.
write
(
data
)
ofp
.
write
(
escape
(
data
)
)
if
"
\
n
"
in
data
:
lastopened
=
None
knownempty
=
0
...
...
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