mirror of
https://github.com/trambarhq/relaks-wordpress-example.git
synced 2025-09-24 22:41:31 +02:00
Fixed image link (issue #31).
This commit is contained in:
@@ -151,7 +151,7 @@ class Route {
|
|||||||
if (node.name === 'a') {
|
if (node.name === 'a') {
|
||||||
} else if (node.name === 'img') {
|
} else if (node.name === 'img') {
|
||||||
// prepend image URL with site URL
|
// prepend image URL with site URL
|
||||||
if (node.attribs.src && !_.startsWith(node.attribs.src, /https?:/)) {
|
if (node.attribs.src && !/^https?:/.test(node.attribs.src)) {
|
||||||
node.attribs.src = siteURL + node.attribs.src;
|
node.attribs.src = siteURL + node.attribs.src;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user