Commit 05ecdbb6 by benjaoming

Fix #178 - improve urlize regex to accept everything after a domain, except spaces, [, and (

parent 2108a322
...@@ -52,7 +52,7 @@ URLIZE_RE = ( ...@@ -52,7 +52,7 @@ URLIZE_RE = (
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' # ...or ipv4 r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' # ...or ipv4
r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6 r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6
r'(?::\d+)?' # optional port r'(?::\d+)?' # optional port
r'(?:/?|[/?]\S+))' r'(?:/[^\s\[\(\]\)]*\s+)?)'
) )
class UrlizePattern(markdown.inlinepatterns.Pattern): class UrlizePattern(markdown.inlinepatterns.Pattern):
......
...@@ -6,15 +6,11 @@ ...@@ -6,15 +6,11 @@
<div class="wiki-article"> <div class="wiki-article">
{% if not preview %} {% if not preview %}
{% if article.current_revision %} {% if article.current_revision %}
{{ article.get_cached_content }} {{ article.get_cached_content }}
{% endif %} {% endif %}
{% else %} {% else %}
{{ content|default:"" }} {{ content|default:"" }}
{% endif %} {% endif %}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment