~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wiki/views.py

  • Committer: franku
  • Date: 2019-04-11 15:06:09 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: somal@arcor.de-20190411150609-801l72ffxgr6gkui
converted to python 3.6 using 2to3 script

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from mainpage.wl_utils import get_valid_cache_key
25
25
 
26
26
import re
27
 
import urllib
 
27
import urllib.request, urllib.parse, urllib.error
28
28
 
29
29
# Settings
30
30
#  lock duration in minutes
662
662
        for regexp in search_title:
663
663
            # Need to unqoute the content to match
664
664
            # e.g. [[ Back | Title%20of%20Page ]]
665
 
            match = regexp.search(urllib.unquote(article.content))
 
665
            match = regexp.search(urllib.parse.unquote(article.content))
666
666
            if match:
667
667
                found_links.append({'title': article.title})
668
668