mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 05:32:48 +00:00
change blog regex to look for src's which start with a slash
This commit is contained in:
parent
d4863ae148
commit
1a67e4982e
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ module.exports = BlogController =
|
||||||
try
|
try
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(data)
|
||||||
if settings.cdn?.web?.host?
|
if settings.cdn?.web?.host?
|
||||||
data?.content = data?.content?.replace(/src="([^"\:]+)"/g, "src='#{settings.cdn?.web?.host}$1'");
|
data?.content = data?.content?.replace(/src="(\/[^"]+)"/g, "src='#{settings.cdn?.web?.host}$1'");
|
||||||
catch err
|
catch err
|
||||||
logger.err err:err, data:data, "error parsing data from data"
|
logger.err err:err, data:data, "error parsing data from data"
|
||||||
res.render "blog/blog_holder", data
|
res.render "blog/blog_holder", data
|
||||||
|
|
Loading…
Reference in a new issue