mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-31 14:11:45 +00:00
Fix post websites on q-chat
This commit is contained in:
@@ -50,6 +50,7 @@ const extractComponents = async (url) => {
|
||||
}
|
||||
|
||||
url = url.replace(/^(qortal:\/\/)/, '');
|
||||
|
||||
if (url.startsWith('use-')) {
|
||||
// Handle the new 'use' format
|
||||
let parts = url.split('/');
|
||||
@@ -101,15 +102,13 @@ const extractComponents = async (url) => {
|
||||
};
|
||||
|
||||
function processText(input) {
|
||||
const linkRegex = /(qortal:\/\/\S+)/g;
|
||||
const linkRegex = /(qortal:\/\/S+)/g;
|
||||
|
||||
function processNode(node) {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
const parts = node.textContent.split(linkRegex);
|
||||
|
||||
if (parts.length > 1) {
|
||||
if (parts.length > 0) {
|
||||
const fragment = document.createDocumentFragment();
|
||||
|
||||
parts.forEach((part) => {
|
||||
if (part.startsWith('qortal://')) {
|
||||
const link = document.createElement('span');
|
||||
|
Reference in New Issue
Block a user