Обновление 1.0.2-1.4.9 #1

Merged
Royce59 merged 9 commits from dev into main 2026-02-17 16:33:42 +00:00
Showing only changes of commit d857be6948 - Show all commits

View File

@@ -46,10 +46,11 @@ export function TextParser(props: TextParserProps) {
{ {
pattern: [ pattern: [
/(https?:\/\/[^\s]+)/g, /(https?:\/\/[^\s]+)/g,
/\b(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:\/[^\s]*)?/g /\b(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:\/[\w\-\.\/\?&#=%]*)?/g
], ],
render: (match: string) => { render: (match: string) => {
let domainZone = match.split('.').pop() || ''; let domain = match.replace(/https?:\/\//, '').split('/')[0];
let domainZone = domain.split('.').pop() || '';
domainZone = domainZone.split('/')[0]; domainZone = domainZone.split('/')[0];
if(!ALLOWED_DOMAINS_ZONES.includes(domainZone)) { if(!ALLOWED_DOMAINS_ZONES.includes(domainZone)) {
return <>{match}</>; return <>{match}</>;