fix(frontend-embed): URLエンコードされた文字列が正常に読み込めない問題を修正 (#14630)
* fix(frontend-embed): URLエンコードされた文字列が正常に読み込めない問題を修正 * fix(frontend-embed): bring back missing bits
This commit is contained in:
@@ -44,8 +44,16 @@ import EmTagPage from '@/pages/tag.vue';
|
||||
import XNotFound from '@/pages/not-found.vue';
|
||||
import EmLoading from '@/components/EmLoading.vue';
|
||||
|
||||
function safeURIDecode(str: string): string {
|
||||
try {
|
||||
return decodeURIComponent(str);
|
||||
} catch {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
const page = location.pathname.split('/')[2];
|
||||
const contentId = location.pathname.split('/')[3];
|
||||
const contentId = safeURIDecode(location.pathname.split('/')[3]);
|
||||
if (_DEV_) console.log(page, contentId);
|
||||
|
||||
const embedParams = inject(DI.embedParams, defaultEmbedParams);
|
||||
|
Reference in New Issue
Block a user