diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-09-09 12:37:00 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-09-10 11:59:10 +0000 |
| commit | 0cda05853ed553aad2d5259dae5e3bb94de0605c (patch) | |
| tree | bde205c28770743ad745deadbbf62b9265d12369 /addons/website_blog/static/src/js/s_latest_posts_frontend.js | |
| parent | 0c5409f2544b9ff9be5bb3f0685c1b14df4d4fb6 (diff) | |
[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>
Diffstat (limited to 'addons/website_blog/static/src/js/s_latest_posts_frontend.js')
| -rw-r--r-- | addons/website_blog/static/src/js/s_latest_posts_frontend.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_blog/static/src/js/s_latest_posts_frontend.js b/addons/website_blog/static/src/js/s_latest_posts_frontend.js index 87f3ffc5f6f..8402f18fdd7 100644 --- a/addons/website_blog/static/src/js/s_latest_posts_frontend.js +++ b/addons/website_blog/static/src/js/s_latest_posts_frontend.js @@ -116,7 +116,7 @@ publicWidget.registry.js_get_posts = publicWidget.Widget.extend({ $progress.appendTo($loadingContainer); $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 loaded = false; |
