1
Fork 0
mirror of https://github.com/RGBCube/cinny synced 2025-08-01 17:37:46 +00:00

Downgraded linkifyjs

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-11-21 19:21:03 +05:30
parent 7fdf165ff3
commit fd25a23d91
5 changed files with 30 additions and 45 deletions

View file

@ -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);

View file

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import './RoomIntro.scss';
import Linkify from 'linkify-react';
import Linkify from 'linkifyjs/react';
import colorMXID from '../../../util/colorMXID';
import Text from '../../atoms/text/Text';

View file

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import './RoomTile.scss';
import Linkify from 'linkify-react';
import Linkify from 'linkifyjs/react';
import colorMXID from '../../../util/colorMXID';
import Text from '../../atoms/text/Text';