Arabic Text.jsx --39-link--39-

import { fixLegacyArabicLinks } from './utils/arabicCorruptionFixer'; function App() { const corruptedData = "مرحبا --39-LINK--39- اضغط هنا"; // From API const fixedData = fixLegacyArabicLinks(corruptedData);

return <span className="arabic-text">{cleanText}</span>; }; Arabic Text.jsx --39-LINK--39-

if (linkUrl) { return ( <a href={linkUrl} className="arabic-link" hrefLang="ar"> {cleanText} </a> ); } import { fixLegacyArabicLinks } from '

export default ArabicText; If you have legacy data containing strings like "مرحبا --39-LINK--39- العالم" , follow this forensic fix: The Root Cause Somewhere in your pipeline (database → API → React), a developer used unsafe string concatenation: if (linkUrl) { return ( &lt

expect(screen.queryByText(/--39-LINK--39-/)).not.toBeInTheDocument(); expect(screen.getByText(/نص تجريبي تجريبي/)).toBeInTheDocument(); });

Here is a corrected ArabicText.jsx that would output --39-LINK--39- :