summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-12-11 19:40:58 -0500
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-12-11 19:40:58 -0500
commit5286598480ff57d265e86ea41922d28176cd2669 (patch)
tree5e1958ceab2e8ec77c7e54e822a89a672fefac22
parent77850390ffe6579eadfbb9e0e593433b1ed9db80 (diff)
downloadaskbot-5286598480ff57d265e86ea41922d28176cd2669.tar.gz
askbot-5286598480ff57d265e86ea41922d28176cd2669.tar.bz2
askbot-5286598480ff57d265e86ea41922d28176cd2669.zip
hopefully the last attempt to fix the autolinker
-rw-r--r--askbot/__init__.py2
-rw-r--r--askbot/utils/markup.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/askbot/__init__.py b/askbot/__init__.py
index 7ddf59e5..3d6ae389 100644
--- a/askbot/__init__.py
+++ b/askbot/__init__.py
@@ -19,4 +19,4 @@ def get_version():
"""returns version of the askbot app
this version is meaningful for pypi only
"""
- return '0.6.45'
+ return '0.6.46'
diff --git a/askbot/utils/markup.py b/askbot/utils/markup.py
index dcdfc5a4..0caf6848 100644
--- a/askbot/utils/markup.py
+++ b/askbot/utils/markup.py
@@ -4,10 +4,10 @@ from askbot.conf import settings as askbot_settings
from markdown2 import Markdown
#url taken from http://regexlib.com/REDetails.aspx?regexp_id=501 by Brian Bothwell
-URL_RE = re.compile("((?<!href=['\"])|(?<!src=['\"]))((http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*)")
+URL_RE = re.compile("((?<!(href|.src)=['\"])((http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*))")
LINK_PATTERNS = [
- (URL_RE, r'\2'),
+ (URL_RE, r'\1'),
]
def get_parser():