feat: sanitize HTML in footer
moved sanitize function into a separate file including some simple tests closes #91
This commit is contained in:
committed by
Bastian
parent
5a5928f2dd
commit
e0113c446d
@@ -6,6 +6,7 @@ import { assetUrl, getItemPageNames, isMobileViewport } from "../../config";
|
||||
import { Item } from "../../model";
|
||||
import "./footer.scss";
|
||||
import { useMessages } from "../../context/MessagesContext";
|
||||
import { sanitize } from "../../sanitize";
|
||||
|
||||
interface Props {
|
||||
items: Item[];
|
||||
@@ -34,7 +35,7 @@ const Footer: React.FC<Props> = ({ items, pageName }) => {
|
||||
/>
|
||||
}
|
||||
>
|
||||
<span className="footnote">{footerFootnote}</span>
|
||||
<div className="footnote" dangerouslySetInnerHTML={sanitize(footerFootnote)}></div>
|
||||
</Branding>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user