diff --git a/layers/templates/CtLayout01/index.vue b/layers/templates/CtLayout01/index.vue
index 6455c5b..41f4733 100644
--- a/layers/templates/CtLayout01/index.vue
+++ b/layers/templates/CtLayout01/index.vue
@@ -254,6 +254,23 @@
return html
})
+ // src 속성에 http/https가 없으면 assetBaseUrl 붙이기
+ const resolveHtmlSrcUrls = (html: string): string => {
+ const base = assetBaseUrl.value || ''
+ if (!base) return html
+
+ return html.replace(
+ /(<[^>]+\s)src\s*=\s*(["'])([^"']+)\2/gi,
+ (_match, prefix: string, quote: string, srcValue: string) => {
+ if (/^https?:\/\//i.test(srcValue)) {
+ return `${prefix}src=${quote}${srcValue}${quote}`
+ }
+ const resolvedUrl = base + srcValue.replace(/^\//, '')
+ return `${prefix}src=${quote}${resolvedUrl}${quote}`
+ },
+ )
+ }
+
// 렌더링용 HTML
// - link/script는 head/body로 별도 주입 (렌더 위치에 남기지 않음)
// - style은 "그 자리에 그대로" 렌더링하되, 적용 안정성을 위해 head에도 복제 주입함
@@ -261,11 +278,15 @@
const html = customContentsRaw.value
if (!html) return ''
- return html
+ let result = html
// link 태그 제거
.replace(/]*>/gi, '')
// script 블록 제거
.replace(/