feat: fix validation

This commit is contained in:
Nevo David 2025-07-17 17:30:24 +07:00
parent 914d0376c4
commit 3ef1bf8365
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ export const GeneralPreviewComponent: FC<{
const mediaDir = useMediaDirectory();
const renderContent = topValue.map((p) => {
const newContent = stripHtmlValidation('plain', p.content, true)
const newContent = stripHtmlValidation('html', p.content, true)
.replace(/(@.+?)(\s)/gi, (match, match1, match2) => {
return `<span class="font-bold" style="color: #ae8afc">${match1.trim()}${match2}</span>`;
})

View File

@ -132,12 +132,12 @@ const underlineMap = {
};
export const stripHtmlValidation = (
type: 'plain' | 'none' | 'normal' | 'markdown' | 'html',
type: 'none' | 'normal' | 'markdown' | 'html',
value: string,
replaceBold = false,
none = false
): string => {
if (type === 'plain') {
if (type === 'html') {
return value;
}