feat: replace relative urls to absolute before sending email notifs

https://github.com/NodeBB/NodeBB/pull/8366/files
This commit is contained in:
Barış Soner Uşaklı
2020-09-03 12:02:07 -04:00
parent c495aacc3e
commit 1e5981c0d6
3 changed files with 9 additions and 7 deletions

View File

@@ -77,7 +77,10 @@ module.exports = function (Posts) {
};
Posts.relativeToAbsolute = function (content, regex) {
// Turns relative links in post body to absolute urls
// Turns relative links in content to absolute urls
if (!content) {
return content;
}
var parsed;
var current = regex.regex.exec(content);
var absolute;