fix: encode thumbnail URL
If it contains space the URL won't load
This commit is contained in:
parent
4a38ce659d
commit
30039e8e62
@ -200,7 +200,7 @@ erpnext.ProductSearch = class {
|
|||||||
let thumbnail = res.thumbnail || '/assets/erpnext/images/ui-states/cart-empty-state.png';
|
let thumbnail = res.thumbnail || '/assets/erpnext/images/ui-states/cart-empty-state.png';
|
||||||
html += `
|
html += `
|
||||||
<div class="dropdown-item" style="display: flex;">
|
<div class="dropdown-item" style="display: flex;">
|
||||||
<img class="item-thumb col-2" src=${thumbnail} />
|
<img class="item-thumb col-2" src=${encodeURI(thumbnail)} />
|
||||||
<div class="col-9" style="white-space: normal;">
|
<div class="col-9" style="white-space: normal;">
|
||||||
<a href="/${res.route}">${res.web_item_name}</a><br>
|
<a href="/${res.route}">${res.web_item_name}</a><br>
|
||||||
<span class="brand-line">${res.brand ? "by " + res.brand : ""}</span>
|
<span class="brand-line">${res.brand ? "by " + res.brand : ""}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user