Strip html from og descriptions. Fixes #830 (#831)

This commit is contained in:
Dessalines 2022-10-21 16:14:53 -04:00 committed by GitHub
parent 4983cb82b5
commit a4edfd11f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 135 additions and 2 deletions

View file

@ -1,4 +1,5 @@
import { Option } from "@sniptt/monads";
import { htmlToText } from "html-to-text";
import { Component } from "inferno";
import { Helmet } from "inferno-helmet";
import { httpExternalPath } from "../../env";
@ -37,7 +38,9 @@ export class HtmlTags extends Component<HtmlTagsProps, any> {
<meta
key={n}
name={n}
content={md.renderInline(this.props.description.unwrap())}
content={htmlToText(
md.renderInline(this.props.description.unwrap())
)}
/>
))}