X-Git-Url: https://git.llucax.com/personal/website.git/blobdiff_plain/82c67a166ee0d3d8893c3ae1e84f91f067045fd0..2270f1fb21528602c4053cfca0c1d109088b5ddf:/source/blog/blog.cgi diff --git a/source/blog/blog.cgi b/source/blog/blog.cgi index f59201a..2865925 100755 --- a/source/blog/blog.cgi +++ b/source/blog/blog.cgi @@ -548,7 +548,7 @@ def valid_link(link): if re.match(mail_re, link, re.I): return 'mailto:' + link elif re.match(url_re, link, re.I): - return 'http://' + link + return 'https://' + link return None @@ -559,11 +559,12 @@ def sanitize(obj): # find out our URL, needed for syndication try: n = os.environ['SERVER_NAME'] - p = os.environ['SERVER_PORT'] + # Removed port because it messes up when behind a proxy + #p = os.environ['SERVER_PORT'] s = os.environ['SCRIPT_NAME'] - if p == '80': p = '' - else: p = ':' + p - full_url = 'http://%s%s%s' % (n, p, s) + #if p == '80': p = '' + #else: p = ':' + p + full_url = 'https://%s%s' % (n, s) except KeyError: full_url = 'Not needed' @@ -927,51 +928,21 @@ class Article (object): import re rst = re.sub(r'.. youtube:: (.*)', r'''.. raw:: html -