diff --git a/src/components/ProposalDetails.js b/src/components/ProposalDetails.js index d3273ab..c72ee72 100644 --- a/src/components/ProposalDetails.js +++ b/src/components/ProposalDetails.js @@ -26,33 +26,37 @@ function ProposalDetails(props) { const { proposal_id, title, description } = proposal const fixDescription = description?.replace(/\\n/g, ' \n') - - const parsedDescription = parse( - micromark(fixDescription, { extensions: [gfm()], htmlExtensions: [gfmHtml()] }), - { replace: transformElement } - ); const transformElement = (node) => { + if (!node || !node.name) { + return node; + } + if (proposal.isSpam && node.name === 'a') { return {node.children[0].data}; } - + switch (node.name) { case 'h1': - return