Anonymous avatar Anonymous committed f130443

Re-add import of render() and sanitize() in webhelpers.html.converters.

Comments (0)

Files changed (3)

 
 tip (development version)
 -------------------------
+* webhelpers.html.converters:
+
+  - Re-add import of ``render`` and ``sanitize`` from
+    ``webhelpers.html.render``.  That module is not public.
+
 * webhelpers.misc:
 
   - New exception ``OverwriteError``.
 * webhelpers.html.converters:
 
   - Don't import ``render`` and ``sanitize`` to converters module.
+    (Reversed in 1.0b5.)
 
 * webhelpers.html.secure_form:
 
   Pagination is replaced by paginate.
 * webhelpers.constants:
 
-  - ``uk_counties`` returns tuples rather than lists.
+  - ``uk_counties`` returns tuples rather than strings.
 
 * webhelpers.feedgenerator:
 
   - ``rfc3339_date`` now accepts date objects without crashing.
   - Add 'generator' and 'source' properties to RSS2 feeds. Patch by
-    Vince Spicer.
+    Vince Spicer. (Removed in 1.0b2 due to bugs.)
   - Add 'published' property to Atom1 feeds.
 
 * webhelpers.html.converters:

webhelpers/html/converters.py

 from webhelpers.html import HTML, escape, literal, lit_sub
 import webhelpers.textile as textile
 
+# render() and sanitize() are imported from the private module 'render'.
+from webhelpers.html.render import render, sanitize
+
 __all__ = [
     "format_paragraphs",
     "markdown", 
     "nl2br",
+    "render",
+    "sanitize",
     "textilize",
     ]
 

webhelpers/html/render.py

+# This is a private implementation module.  Import render() and sanitize()
+# from webhelpers.html.converters .
+
 # Contributed by Ian Bicking, downloaded from
 # http://svn.w4py.org/ZPTKit/trunk/ZPTKit/htmlrender.py
 # (Webware for Python framework)
         u'I really like steak!'
         >>> sanitize(u'I <i>really</i> like <script language="javascript">NEFARIOUS CODE</script> steak!')
         u'I really like NEFARIOUS CODE steak!'
-
-    This is the same as ``webhelpers.render.sanitize`` but is an older
-    implementation.
     """
     p = HTMLSanitizer()
     p.feed(html)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.