Normalize AI product HTML for the rich text description editor.
Sanitize model output to an allowlisted fragment and convert plain/markdown fallbacks so description text stays inside the advanced editor. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
8d59166fe8
commit
404c008ced
@@ -82,6 +82,8 @@
|
||||
.fieldWithAi {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.aiFillAnchor {
|
||||
|
||||
@@ -352,6 +352,7 @@ export function AddNewProductPage() {
|
||||
value={description}
|
||||
onChange={setDescription}
|
||||
placeholder={t('products.form.descriptionPlaceholder')}
|
||||
editorMinHeight={180}
|
||||
/>
|
||||
<span className={styles.aiFillAnchor}>
|
||||
<Tooltip label={t('products.form.aiFill')}>
|
||||
|
||||
Reference in New Issue
Block a user