mirror of
https://github.com/trambarhq/relaks-wordpress-example.git
synced 2025-09-25 06:51:30 +02:00
Fixed image link (issue #31).
This commit is contained in:
@@ -151,7 +151,7 @@ class Route {
|
||||
if (node.name === 'a') {
|
||||
} else if (node.name === 'img') {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user