Skip to content

Commit

Permalink
Fix abolute links not working in wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jul 25, 2018
1 parent e0c8277 commit 04009ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/models/api/javascript-api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ ParsedPage JavascriptApi::parsePage(Page *parentPage, const QString &source, int
if (results.hasProperty("urlPrevPage") && results.property("urlPrevPage").isString())
{ ret.urlPrevPage = results.property("urlPrevPage").toString(); }
if (results.hasProperty("wiki") && results.property("wiki").isString())
{ ret.wiki = results.property("wiki").toString(); }
{
ret.wiki = results.property("wiki").toString();
ret.wiki = ret.wiki.replace("href=\"/", "href=\"" + site->baseUrl() + "/");
}

return ret;
}
Expand Down

0 comments on commit 04009ce

Please sign in to comment.