SVN1348 - Person detail boxes ... line wrap inappropriate
Brought to you by:
canajun2eh,
yalnifj
On a family.php page (for instance), I'm seeing inappropriate line wrapping in some people's info boxes, such as
Death 1873 (Age 77-78) Age: 78 -- Penzance (district)
, Cornwall, England
ie the line is breaking incorrectly. It should be either
Death 1873 (Age 77-78) Age: 78 -- Penzance (district),
Cornwall, England
or
Death 1873 (Age 77-78) Age: 78 -- Penzance
(district), Cornwall, England
Looking at the source code, it looks like the presence of ‎ is responsible and is causing a line break part way through the "word".
<span class="details_label">Death</span> 1873 <span class="age">(Age 77-78)</span> <span class="label">Age</span>: 78 -- Penzance ‎(district)‎, Cornwall, England<br />
Mark
Logged In: YES
user_id=1466942
Originator: NO
This is one of numerous problems with the PrintReady() function.
It adds lrm/rlm codes around brackets to cure problems with mixed ltr and rtl text either side of brackets.
However, it adds the codes even when they are not needed:
a) because the text inside the brackets has the same directionality as the text outside
b) even if they already exist, more will be added.
There has to be a better way.
Since we can easily identify text with rtl characteristics, perhaps we could restrict ourselves to adding them when you have rtl text inside brackets on an ltr page and vice versa?
Logged In: YES
user_id=634811
Originator: NO
One thing that might help, is to check if RTL processing is enabled before we ever add ‏ or ‎. This would be quicker than checking the text. If RTL processing is enabled we could then check the text (dates can have RTL text). We should probabl;y do this project-wide.