diff options
-rwxr-xr-x | scripts/html.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/html.py b/scripts/html.py index d9b181d..26f6804 100755 --- a/scripts/html.py +++ b/scripts/html.py @@ -7,6 +7,7 @@ #=============================== import sys import os +import re import base import find @@ -500,6 +501,12 @@ class periject_html(base.base): with html("ul"): for comment in comments: + str = re.search(r'(https?://[\w/:%#\$&\?\(\)~\.=\+\-]+)', comment) + if (str): + a = html("a", {"href":str.group(), + "target":"_blank"}) + comment = str.string[:str.start()] + a.text(str.group()) + str.string[str.end():] + html("li").print(comment) #-------------------- |