mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 15:00:30 +03:00
Downgraded linkifyjs
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
7fdf165ff3
commit
fd25a23d91
5 changed files with 30 additions and 45 deletions
|
|
@ -3,7 +3,7 @@ import React, { useState, useRef } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import './Message.scss';
|
||||
|
||||
import linkifyHtml from 'linkify-html';
|
||||
import linkifyHtml from 'linkifyjs/html';
|
||||
import parse from 'html-react-parser';
|
||||
import twemoji from 'twemoji';
|
||||
import dateFormat from 'dateformat';
|
||||
|
|
@ -106,8 +106,8 @@ function MessageBody({
|
|||
if (typeof body !== 'string') return <div className="message__body">{body}</div>;
|
||||
|
||||
let content = isCustomHTML ? sanitizeCustomHtml(body) : body;
|
||||
content = linkifyHtml(content, { target: '_blank', rel: 'noreferrer noopener' });
|
||||
if (!isCustomHTML) content = sanitizeText(body);
|
||||
content = linkifyHtml(content, { target: '_blank', rel: 'noreferrer noopener' });
|
||||
content = twemoji.parse(content);
|
||||
|
||||
const parsed = parse(content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue