Page MenuHomePhabricator

Add {{bidi:}} syntax for directionality-safe arguments
Closed, ResolvedPublic


This is to avoid BIDI corruption that looks like "(Ben_(WMF", which happens when a string is inserted into a context with the reverse directionality. Directionality-neutral characters at the edge of the string can get wrongly interpreted by the BIDI algorithm. This would let you embed your substituted string into a new BIDI context, e.g.:

"Shalom, {{bidi:$1}}, hi!"

The embedded context's directionality is determined by looking at the argument for $1, and then explicitly inserted into the Unicode text, ensuring correct rendering (because then the bidi algorithm "knows" the argument text is a separate context).

Some contexts would benefit from an RTL alternative to 'bidi', a strongly LTR string that will sometimes mess up the appearance of RTL message source code for translators, which would be a pain.

Event Timeline

Jdforrester-WMF assigned this task to dchan.
Jdforrester-WMF raised the priority of this task from to High.
Jdforrester-WMF updated the task description. (Show Details)

Change 221774 had a related patch set uploaded (by Divec):
Add {{bidi:}} syntax for directionality-safe arguments

Change 221323 had a related patch set uploaded (by Divec):
Strong directionality support

Change 221323 merged by jenkins-bot:
Strong directionality support

Change 221774 merged by jenkins-bot:
Add {{bidi:}} syntax for directionality-safe arguments

All patches merged.
@dchan: What is left to do here? Can the task status be set to "resolved"?

Umherirrender set Security to None.