Bidirectional characters in LTR languages post security fix

Demo:

#include <stdio.h>

int main() {
    /* Say hello; newline<U+2067> /*/ return 0 ;
    printf("Hello world.\n");
    return 0;
}
#include 

int main() {
    /* Say hello; newline<U+2067> /*/ return 0 ;
    printf("Hello world.\n");
    return 0;
}

Test: ‫"שלום חבר" - Hello Friend

Without BIDI

Test: “שלום חבר” - Hello Friend

Markdown:

Test: &#x202B;"שלום חבר" - Hello Friend

Without BIDI

Test: "שלום חבר" - Hello Friend

Not the best example in the world, but you should get the gist here, only impacts source code being posted on the forum. Bidi chars in source code is not something that is usually done.

5 Likes