Anonymous avatar Anonymous committed bb3bc55

Bugfix re URLs surrounded by []. Bug #32.

Comments (0)

Files changed (3)

 tip (development version)
+ - Bugfix re URLs surrounded by [].  Bug #32.
+1.0rc1 (2010-05-24)
 * webhelpers.html.tags:
  - Change 'id' argument to all form field helpers. The default value is now


-            literal('')
+            literal(''),
         for url in urls:
             self.assertEqual('<a href="%s">%s</a>' % (url, url),
+    def test_auto_link_with_brackets(self):
+        self.assertEqual(
+            '[<a href=""></a>]',
+            auto_link('[]'))
     def test_auto_linking(self):
         raw_values = {
             'email_raw': literal(''),


                           (?:\?[\w\+\/%&=.;-]+)?     # query string
                           (?:\#[\w\-]*)?           # trailing anchor
-                        ([\.,"'?!;:]|\s|<|$)       # trailing text
+                        ([\.,"'?!;:]|\s|<|\]|$)       # trailing text
                            """, re.X)
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
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.