diff --git a/src/components/common/SafeLink.tsx b/src/components/common/SafeLink.tsx index 412db2561..bd3b3f635 100644 --- a/src/components/common/SafeLink.tsx +++ b/src/components/common/SafeLink.tsx @@ -18,7 +18,6 @@ type OwnProps = { text: string; className?: string; children?: TeactNode; - withNormalWordBreak?: boolean; isRtl?: boolean; }; @@ -27,19 +26,18 @@ const SafeLink = ({ text, className, children, - withNormalWordBreak, isRtl, }: OwnProps) => { const { openUrl } = getActions(); const content = children || text; - const isSafe = url === text; + const isRegularLink = url === text; const handleClick = useLastCallback((e: React.MouseEvent) => { if (!url) return true; e.preventDefault(); - openUrl({ url, shouldSkipModal: isSafe }); + openUrl({ url, shouldSkipModal: isRegularLink }); return false; }); @@ -50,7 +48,7 @@ const SafeLink = ({ const classNames = buildClassName( className || 'text-entity-link', - !withNormalWordBreak && 'word-break-all', + isRegularLink && 'word-break-all', ); return ( diff --git a/src/components/common/helpers/renderTextWithEntities.tsx b/src/components/common/helpers/renderTextWithEntities.tsx index 4a1f970e2..a8239e55d 100644 --- a/src/components/common/helpers/renderTextWithEntities.tsx +++ b/src/components/common/helpers/renderTextWithEntities.tsx @@ -559,7 +559,6 @@ function processEntity({ {renderNestedMessagePart()} diff --git a/src/components/middle/message/_message-content.scss b/src/components/middle/message/_message-content.scss index ab67e7353..2100ee647 100644 --- a/src/components/middle/message/_message-content.scss +++ b/src/components/middle/message/_message-content.scss @@ -983,7 +983,7 @@ .text-entity-link { color: var(--color-links) !important; text-decoration: none !important; - word-break: break-word; + overflow-wrap: break-word; cursor: var(--custom-cursor, pointer); unicode-bidi: initial; diff --git a/src/components/modals/reportAd/ReportAdModal.tsx b/src/components/modals/reportAd/ReportAdModal.tsx index c57ff0b1e..a922111d9 100644 --- a/src/components/modals/reportAd/ReportAdModal.tsx +++ b/src/components/modals/reportAd/ReportAdModal.tsx @@ -65,7 +65,6 @@ const ReportAdModal = ({ return [ parts[0], ,