[FIX] website_blog: Latest Posts
On the website, when the widget "Latest Posts - Big Images" or "Latest Posts - List" is added a 404 error is raised in the console. This is because the regular expression of the background image is too 'greedy' and also match the trailing double quote, e.g.: `website_blog.blog_post_cover_02"` instead of `website_blog.blog_post_cover_02`. By making it match the minimum pattern, the trailing double quote is not selected. opw-2061596 closes odoo/odoo#36622 X-original-commit: 0797a4ab90ec4d9be55e16d917da98909ce0ece4 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
committed by
fw-bot
parent
0c5409f254
commit
0cda05853e
@@ -116,7 +116,7 @@ publicWidget.registry.js_get_posts = publicWidget.Widget.extend({
|
|||||||
$progress.appendTo($loadingContainer);
|
$progress.appendTo($loadingContainer);
|
||||||
$post.appendTo(self.$target);
|
$post.appendTo(self.$target);
|
||||||
|
|
||||||
var m = $thumb.css('background-image').match(/url\(["']?(.+)["']?\)/);
|
var m = $thumb.css('background-image').match(/url\(["']?(.+?)["']?\)/);
|
||||||
var bg = m ? m[1] : 'none';
|
var bg = m ? m[1] : 'none';
|
||||||
var loaded = false;
|
var loaded = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user