-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(html-sanitize): replace html-sanitize with dom-purify because of bug #81
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
import { compact, get } from 'lodash-es'; | ||
import moment from 'moment'; | ||
import React, { FunctionComponent } from 'react'; | ||
|
||
import { | ||
BlockHeading, | ||
Container, | ||
|
@@ -12,6 +8,9 @@ import { | |
TagOption, | ||
Thumbnail, | ||
} from '@viaa/avo2-components'; | ||
import { compact, get } from 'lodash-es'; | ||
import moment from 'moment'; | ||
import React, { FunctionComponent } from 'react'; | ||
Comment on lines
+11
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this throw linting warnings about import groups? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no for me it doesn't I'll look at it some other time. |
||
import { GET_CONTENT_PAGE_WIDTH_OPTIONS } from '~modules/content-page/const/content-page.consts'; | ||
import { useContentTypes } from '~modules/content-page/hooks/useContentTypes'; | ||
import { ContentPageService } from '~modules/content-page/services/content-page.service'; | ||
|
@@ -23,6 +22,7 @@ import { | |
renderDetailRow, | ||
renderSimpleDetailRows, | ||
} from '~modules/shared/helpers/render-detail-fields'; | ||
import { SanitizePreset } from '~modules/shared/helpers/sanitize/presets'; | ||
import { useTranslation } from '~modules/shared/hooks/useTranslation'; | ||
import { useUserGroupOptions } from '~modules/user-group/hooks/useUserGroupOptions'; | ||
|
||
|
@@ -102,7 +102,7 @@ export const ContentPageDetailMetaData: FunctionComponent<ContentDetailMetaDataP | |
|
||
return tHtml('admin/content/views/content-detail-meta-data___nee'); | ||
}; | ||
const description = ContentPageService.getDescription(contentPageInfo, 'full'); | ||
const description = ContentPageService.getDescription(contentPageInfo, SanitizePreset.full); | ||
return ( | ||
<Container mode="vertical" size="small"> | ||
<Container mode="horizontal"> | ||
|
@@ -111,7 +111,7 @@ export const ContentPageDetailMetaData: FunctionComponent<ContentDetailMetaDataP | |
<BlockHeading type="h4"> | ||
{tHtml('admin/content/views/content-detail___omschrijving')} | ||
</BlockHeading> | ||
<Html content={description || '-'} sanitizePreset="full" /> | ||
<Html content={description || '-'} sanitizePreset={SanitizePreset.full} /> | ||
</Spacer> | ||
)} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added that.
One is a peer dependency, but you added it to dev dependencies as well to make sure it is always installed in the developer machine.
although i ran into the issue a few times where i update the peer dependency and nothing changes, because i also need to change it in the dev dependency section