fix: update - dark mode, i18n, bug fixes across frontend pages
This commit is contained in:
@@ -21,10 +21,12 @@ import { useNavigate, useParams } from "react-router-dom";
|
||||
import { api_request } from "@/utils/request";
|
||||
import { useRecordHistory } from "@/hooks/useRecordHistory";
|
||||
import { formatDateTime } from "@/utils/time";
|
||||
import { sanitizeHtml } from "@/utils/htmlSanitizer";
|
||||
|
||||
const ArticleDetail: React.FC = () => {
|
||||
const navigate = useNavigate();
|
||||
const { id } = useParams();
|
||||
const { t, i18n } = useTranslation();
|
||||
const [article, setArticle] = useState<any>(null);
|
||||
const [comments, setComments] = useState<any[]>([]);
|
||||
const [liked, setLiked] = useState(false);
|
||||
@@ -407,7 +409,7 @@ const ArticleDetail: React.FC = () => {
|
||||
</div>
|
||||
|
||||
<div className="article-body-card">
|
||||
<div className="article-body" dangerouslySetInnerHTML={{ __html: article.content }} />
|
||||
<div className="article-body" dangerouslySetInnerHTML={{ __html: sanitizeHtml(article.content || "") }} />
|
||||
|
||||
{article.related_articles && article.related_articles.length > 0 && (
|
||||
<div className="related-articles-section">
|
||||
|
||||
Reference in New Issue
Block a user