mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
add hyphen to the possible subdomain (fixes #6)
This commit is contained in:
+1
-1
@@ -148,7 +148,7 @@ module.exports = function(redis) {
|
||||
data.html = data.html.replace(maps_wikimedia_regx, '/media/maps_wikimedia_org')
|
||||
|
||||
// replace wiki links
|
||||
const wiki_href_regx = /(href=\"(https:|http:|)\/\/([A-z.]+\.)?(wikipedia.org|wikimedia.org|wikidata.org|mediawiki.org))/gm
|
||||
const wiki_href_regx = /(href=\"(https:|http:|)\/\/([A-z.-]+\.)?(wikipedia.org|wikimedia.org|wikidata.org|mediawiki.org))/gm
|
||||
data.html = data.html.replace(wiki_href_regx, `href="${protocol}${config.domain}`)
|
||||
|
||||
redis.setex(url, config.setexs.wikipage, data.html, (error) => {
|
||||
|
||||
Reference in New Issue
Block a user