---
title: "Comment by OneLifeVibe on \"Rich text in Arabic portals: paste, sanitize and render\" | Hashnode"
description: "The point about direction surviving sanitization is the one most guides skip — stripping attributes feels safe until an Arabic note with an English equipment co"
url: "https://hashnode.com/posts/rich-text-arabic-portals-paste-sanitize-render/6aef082a4525742078de46de/comment/6aef37393bebc514375d3ed4"
---

[Discussion](https://hashnode.com/posts/rich-text-arabic-portals-paste-sanitize-render/6aef082a4525742078de46de)

Comment [Rich text in Arabic portals: paste, sanitize and render](https://hashnode.com/posts/rich-text-arabic-portals-paste-sanitize-render/6aef082a4525742078de46de)

[OneLifeVibe](https://hashnode.com/@onelifevibe)

[Nov 7](https://hashnode.com/posts/rich-text-arabic-portals-paste-sanitize-render/6aef082a4525742078de46de/comment/6aef37393bebc514375d3ed4)

The point about direction surviving sanitization is the one most guides skip — stripping attributes feels safe until an Arabic note with an English equipment code and parentheses renders backwards and the meaning changes. Treating paste as an import into a document model, rather than a clipboard dump, is also the right framing; the contenteditable default of keeping formatting is exactly how stray styles and direction markup leak in. I liked the fixture set at the end, especially reopening saved fixtures after a sanitizer or parser update — that is the check teams forget, and it is where a previously safe note quietly starts rendering differently. One thing I would add: the renderer inventory is worth extending to exported views too, like PDFs or emailed copies, since those often bypass the sanitized path entirely.
