diff --git a/src/Blocks/Footnote/FootnotesBlockView.jsx b/src/Blocks/Footnote/FootnotesBlockView.jsx
index 08c9629..cc8d304 100644
--- a/src/Blocks/Footnote/FootnotesBlockView.jsx
+++ b/src/Blocks/Footnote/FootnotesBlockView.jsx
@@ -3,13 +3,13 @@ import {
openAccordionOrTabIfContainsFootnoteReference,
getAllBlocksAndSlateFields,
makeFootnoteListOfUniqueItems,
- makeFootnote,
} from '@eeacms/volto-slate-footnote/editor/utils';
import './less/public.less';
import { UniversalLink } from '@plone/volto/components';
const alphabet = 'abcdefghijklmnopqrstuvwxyz';
+const urlRegex = /https?:\/\/[^\s]+/g;
/**
* @summary The React component that displays the list of footnotes inserted
@@ -19,6 +19,7 @@ const alphabet = 'abcdefghijklmnopqrstuvwxyz';
* @param {Object} props Contains the properties `data` and `properties` as
* received from the Volto form.
*/
+
const FootnotesBlockView = (props) => {
const { data, properties, tabData, content } = props;
const { title, global, placeholder = 'Footnotes' } = data;
@@ -75,6 +76,30 @@ const FootnotesBlockView = (props) => {
startList = citationIndice;
}
+ const renderTextWithLinks = (text) => {
+ if (!text) return null;
+ const parts = text.split(urlRegex);
+ const links = text.match(urlRegex);
+ let result = [];
+
+ parts.forEach((part, index) => {
+ result.push({part});
+
+ if (links && links[index]) {
+ result.push(
+