Fix bug preventing articles with HTML entities in their file name to get their comments loaded at page refresh

This commit is contained in:
Tissevert 2019-02-19 18:59:24 +01:00
parent 602e345977
commit 1d348220fa
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,8 @@ function DomRenderer(modules) {
var div = document.getElementById('contents');
if(div.children[0] && div.children[0].tagName.toLowerCase() == 'article') {
var re = new RegExp('/' + blog.path.articlesPath + '/([^.]+)\.html');
convertArticle(div.children[0], document.location.pathname.replace(re, '$1'));
var key = decodeURI(document.location.pathname.replace(re, '$1'));
convertArticle(div.children[0], key);
} else {
var articles = div.getElementsByClassName('articles')[0];
if(articles != undefined) {