[Zope-dev] Structured text + ~s in URLs...

Edward Jason Riedy ejr@CS.Berkeley.EDU, zope-dev@zope.org
Mon, 31 Jan 2000 20:46:58 -0800


Structured text doesn't like ~s in URLs.  It should.

Jason

--- StructuredText.py.orig	Mon Jan 31 19:00:29 2000
+++ StructuredText.py	Mon Jan 31 19:00:30 2000
@@ -473,7 +473,7 @@
 
         aStructuredString = gsub(
             '\"\([^\"\0]+\)\":'         # title: <"text":>
-            + ('\([-:a-zA-Z0-9_,./?=@#]+%s\)'
+            + ('\([-:a-zA-Z0-9_,./?=@#~]+%s\)'
                % not_punctuation_or_whitespace)
             + optional_trailing_punctuation
             + trailing_space,
@@ -482,7 +482,7 @@
 
         aStructuredString = gsub(
             '\"\([^\"\0]+\)\",[\0- ]+'            # title: <"text", >
-            + ('\([a-zA-Z]*:[-:a-zA-Z0-9_,./?=@#]*%s\)'
+            + ('\([a-zA-Z]*:[-:a-zA-Z0-9_,./?=@#~]*%s\)'
                % not_punctuation_or_whitespace)
             + optional_trailing_punctuation
             + trailing_space,