Commits  committed d1f54ac Merge

Allow slash in query string in auto_link(). Issue #10; patch by hanula.

  • Participants
  • Parent commits d0dbee7, 2bd7961
  • Branches trunk

Comments (0)

Files changed (3)

   - Reimplement ``highlight()`` using the HTML builder. New arguments add
     flexibility.  Deprecate the ``highlighter`` argument, which creates tags
     via string interpolation.
+  - Fixed ``auto_link()`` to parse slash characters in query string.
+    Patch by hanula; Bitbucket issue #10.
   - Fix HTML overescaping and underescaping in auto_link().  Patch by Marius
     Gedminas.  A parsing bug remains:

File tests/

-            literal('')
+            literal(''),
+            literal('')
         for url in urls:
             self.assertEqual('<a href="%s">%s</a>' % (url, url),

File webhelpers/html/

                           (?:\.[-\w]+)*            # remaining subdomains or domain
                           (?::\d+)?                # port
                           (?:/(?:(?:[~\w\+%-]|(?:[,.;:][^\s$]))+)?)* # path
-                          (?:\?[\w\+%&=.;-]+)?     # query string
+                          (?:\?[\w\+\/%&=.;-]+)?     # query string
                           (?:\#[\w\-]*)?           # trailing anchor
                         ([\.,"'?!;:]|\s|<|$)       # trailing text