mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-05 04:52:58 +00:00
f
This commit is contained in:
+7
-5
@@ -67,11 +67,11 @@
|
|||||||
const bannerStyle = banner.Style || {};
|
const bannerStyle = banner.Style || {};
|
||||||
const imagePosition = bannerStyle.ImagePosition || 'right';
|
const imagePosition = bannerStyle.ImagePosition || 'right';
|
||||||
|
|
||||||
// Process HTML content
|
// Process HTML content - unescape HTML entities
|
||||||
const processHtml = (html) => {
|
const processHtml = (html) => {
|
||||||
const div = document.createElement('div');
|
const textarea = document.createElement('textarea');
|
||||||
div.innerHTML = html;
|
textarea.innerHTML = html;
|
||||||
return div.innerHTML;
|
return textarea.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create main container
|
// Create main container
|
||||||
@@ -126,7 +126,9 @@
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const img = document.createElement('img');
|
const img = document.createElement('img');
|
||||||
img.src = bannerImage.startsWith('http') ? bannerImage : `/${bannerImage}`;
|
// Fix image path - remove any leading slashes and add the correct base path
|
||||||
|
const cleanImagePath = bannerImage.replace(/^\/+/, '');
|
||||||
|
img.src = bannerImage.startsWith('http') ? bannerImage : `/uploads/${cleanImagePath}`;
|
||||||
img.alt = 'Banner image';
|
img.alt = 'Banner image';
|
||||||
img.style.cssText = `
|
img.style.cssText = `
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user