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
4949da95
Commit
4949da95
authored
Aug 16, 2002
by
Casey Duncan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #186, added urlencode to PythonScripts.standard
parent
fffa0a8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/Products/PythonScripts/help/standard.py
lib/python/Products/PythonScripts/help/standard.py
+17
-9
lib/python/Products/PythonScripts/standard.py
lib/python/Products/PythonScripts/standard.py
+3
-2
No files found.
doc/CHANGES.txt
View file @
4949da95
...
...
@@ -118,6 +118,9 @@ Zope Changes
- #178: Don't compile PythonScripts in skins directories
Features Added
- Collector #186: Added urlencode to the standard importables for
Python scripts.
- <dtml-var name> and &dtml.-name; will now automatically HTML-quote
unsafe data taken implictly from the REQUEST object. Data taken
...
...
lib/python/Products/PythonScripts/help/standard.py
View file @
4949da95
...
...
@@ -51,12 +51,11 @@ def url_quote(s):
See Also
"Python 'urllib'
module":http://www.python.org/doc/current/lib/module-urllib.html
"Python 'urllib' module":http://www.python.org/doc/current/lib/module-urllib.html
'quote' function.
"""
def
url_quote_plus
(
s
):
"""
Like url_quote but also replace blank space characters with
...
...
@@ -64,8 +63,7 @@ def url_quote_plus(s):
See Also
"Python 'urllib'
module":http://www.python.org/doc/current/lib/module-urllib.html
"Python 'urllib' module":http://www.python.org/doc/current/lib/module-urllib.html
'quote_plus' function.
"""
...
...
@@ -77,8 +75,7 @@ def url_unquote(s):
See Also
"Python 'urllib'
module":http://www.python.org/doc/current/lib/module-urllib.html
"Python 'urllib' module":http://www.python.org/doc/current/lib/module-urllib.html
'unquote' function.
"""
...
...
@@ -89,11 +86,22 @@ def url_unquote_plus(s):
See Also
"Python 'urllib'
module":http://www.python.org/doc/current/lib/module-urllib.html
"Python 'urllib' module":http://www.python.org/doc/current/lib/module-urllib.html
'unquote_plus' function.
"""
def
urlencode
(
query
,
doseq
=
0
):
"""
Convert a mapping object (such as a dictionary) or a sequence of
two-element tuples to a URL encoded query string. Useful for generating
query strings programmatically.
See Also
"Python 'urllib' module":http://www.python.org/doc/current/lib/module-urllib.html
'urlencode' function.
"""
def
newline_to_br
(
s
):
"""
...
...
lib/python/Products/PythonScripts/standard.py
View file @
4949da95
...
...
@@ -18,7 +18,7 @@ Scripts. It can be accessed from Python with the statement
"import Products.PythonScripts.standard"
"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
from
AccessControl
import
ModuleSecurityInfo
,
getSecurityManager
security
=
ModuleSecurityInfo
()
...
...
@@ -28,11 +28,12 @@ security.declarePublic('special_formats', 'whole_dollars',
'sql_quote'
,
'html_quote'
,
'url_quote'
,
'url_quote_plus'
,
'newline_to_br'
,
'thousands_commas'
,
'url_unquote'
,
'url_unquote_plus'
)
'url_unquote_plus'
,
'urlencode'
)
from
DocumentTemplate.DT_Var
import
special_formats
,
\
whole_dollars
,
dollars_and_cents
,
structured_text
,
sql_quote
,
\
html_quote
,
url_quote
,
url_quote_plus
,
newline_to_br
,
thousands_commas
,
\
url_unquote
,
url_unquote_plus
from
urllib
import
urlencode
from
Globals
import
HTML
from
AccessControl.DTML
import
RestrictedDTML
...
...
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