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
63
package-lock.json
generated
63
package-lock.json
generated
|
@ -18,9 +18,7 @@
|
|||
"flux": "^4.0.1",
|
||||
"formik": "^2.2.9",
|
||||
"html-react-parser": "^1.2.7",
|
||||
"linkify-html": "^3.0.3",
|
||||
"linkify-react": "^3.0.3",
|
||||
"linkifyjs": "^3.0.3",
|
||||
"linkifyjs": "^2.1.9",
|
||||
"matrix-js-sdk": "^12.4.1",
|
||||
"micromark": "^3.0.3",
|
||||
"micromark-extension-gfm": "^1.0.0",
|
||||
|
@ -8707,6 +8705,12 @@
|
|||
"integrity": "sha512-+az2gi/hvex7eLTMTlbRLOhH6P6WFdk2ITI8HJsaH2VqYO0I594zXSYEP+tf4FW+8Cy68ScDXoAsQdyQanv3sw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/jquery": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
|
@ -9110,27 +9114,15 @@
|
|||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/linkify-html": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkify-html/-/linkify-html-3.0.3.tgz",
|
||||
"integrity": "sha512-yqfeq9WNGXlk36ka8j862D70L2Ddh+wJkExaHsUJTNTL7D5tDFZbLpFrcHGa6Zy3t8Kk/1Edw7WUPyPV09zbXQ==",
|
||||
"peerDependencies": {
|
||||
"linkifyjs": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/linkify-react": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkify-react/-/linkify-react-3.0.3.tgz",
|
||||
"integrity": "sha512-CdERZyocGB+2sHYKMKltAWy5TyelgocnMI7SU5vdT0ojtZd1u8sRuntXrxjA3tvgTirtLm2nD7gDdJFaVXvDAw==",
|
||||
"peerDependencies": {
|
||||
"linkifyjs": "^3.0.0",
|
||||
"react": ">= 15.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/linkifyjs": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-3.0.3.tgz",
|
||||
"integrity": "sha512-ba5opS5wRHSbDC8VaiDdN14nPGm6LqyRsIPQZGG4qXV4scFdrPneT/uoZOaq9QAPBf6W9I9D/6tNSzWH//815Q=="
|
||||
"version": "2.1.9",
|
||||
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.9.tgz",
|
||||
"integrity": "sha512-74ivurkK6WHvHFozVaGtQWV38FzBwSTGNmJolEgFp7QgR2bl6ArUWlvT4GcHKbPe1z3nWYi+VUdDZk16zDOVug==",
|
||||
"peerDependencies": {
|
||||
"jquery": ">= 1.11.0",
|
||||
"react": ">= 0.14.0",
|
||||
"react-dom": ">= 0.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/load-bmfont": {
|
||||
"version": "1.4.1",
|
||||
|
@ -22648,6 +22640,12 @@
|
|||
"integrity": "sha512-+az2gi/hvex7eLTMTlbRLOhH6P6WFdk2ITI8HJsaH2VqYO0I594zXSYEP+tf4FW+8Cy68ScDXoAsQdyQanv3sw==",
|
||||
"dev": true
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
|
||||
"peer": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
|
@ -23002,22 +23000,11 @@
|
|||
"computed-style": "~0.1.3"
|
||||
}
|
||||
},
|
||||
"linkify-html": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkify-html/-/linkify-html-3.0.3.tgz",
|
||||
"integrity": "sha512-yqfeq9WNGXlk36ka8j862D70L2Ddh+wJkExaHsUJTNTL7D5tDFZbLpFrcHGa6Zy3t8Kk/1Edw7WUPyPV09zbXQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"linkify-react": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkify-react/-/linkify-react-3.0.3.tgz",
|
||||
"integrity": "sha512-CdERZyocGB+2sHYKMKltAWy5TyelgocnMI7SU5vdT0ojtZd1u8sRuntXrxjA3tvgTirtLm2nD7gDdJFaVXvDAw==",
|
||||
"requires": {}
|
||||
},
|
||||
"linkifyjs": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-3.0.3.tgz",
|
||||
"integrity": "sha512-ba5opS5wRHSbDC8VaiDdN14nPGm6LqyRsIPQZGG4qXV4scFdrPneT/uoZOaq9QAPBf6W9I9D/6tNSzWH//815Q=="
|
||||
"version": "2.1.9",
|
||||
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.9.tgz",
|
||||
"integrity": "sha512-74ivurkK6WHvHFozVaGtQWV38FzBwSTGNmJolEgFp7QgR2bl6ArUWlvT4GcHKbPe1z3nWYi+VUdDZk16zDOVug==",
|
||||
"requires": {}
|
||||
},
|
||||
"load-bmfont": {
|
||||
"version": "1.4.1",
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
"flux": "^4.0.1",
|
||||
"formik": "^2.2.9",
|
||||
"html-react-parser": "^1.2.7",
|
||||
"linkify-html": "^3.0.3",
|
||||
"linkify-react": "^3.0.3",
|
||||
"linkifyjs": "^3.0.3",
|
||||
"linkifyjs": "^2.1.9",
|
||||
"matrix-js-sdk": "^12.4.1",
|
||||
"micromark": "^3.0.3",
|
||||
"micromark-extension-gfm": "^1.0.0",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue