使用 Lighthouse 進行檢測
const Post = props => (
<post className="p-3"> <post className="p-3">
<Card> <Card>
<Card.Img variant="top" alt={props.alt || "default"} src={props.image} /> <Card.Img variant="top" alt={props.alt || "default"} src={props.image} />
<Card.Body> <Card.Body>
<Card.Title dangerouslySetInnerHTML={{__html: props.title}}/> <Card.Title dangerouslySetInnerHTML={{ __html: props.title }} />
<Card.Text dangerouslySetInnerHTML={{__html: props.excerpt}}/> <Card.Text>
<Button variant="warning" href={props.readMore}>Read More...</Button> <div dangerouslySetInnerHTML={{ __html: props.excerpt }} />
</Card.Text>
<Button variant="warning" href={props.readMore}>
Read More...
</Button>
</Card.Body> </Card.Body>
</Card> </Card>
</post> </post>