For the placeholder of special characters (<U+XXXX>s), the bidirectional category of placeholders should match the bidirectional category of the original character. Although I guess almost all of those special characters which are represented by <U+XXXX> belongs to Boundary_Neutral class.

For example, here you can see what has happened when I've replaced 2 spaces with Zero-width non-joiners:

تصویر درون برنامه‌ای 1

Here is the textual version, which is rendered correctly in my browser (Chrome 33):

  (متن راست به چپ)  
    (متن راست‌به‌چپ)  

Properties of U+200C: http://unicode.org/cldr/utility/character.jsp?a=200C

I'm interested in working on it and submitting a pull request, if you accept this semi-feature-request and specify which solution is preferred. I have a workaround suggestion: replacing them with some symbolic characters, for example ⦿ for null, ↩︎ for line separator, ╵ for zero-width space, ╽ for zero-width non-joiner, ╈ zero-width joiner, ...

Best regards
Reza