Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE9 Period Wrap Bug

I just uncovered this little gem of an IE9 bug. It seems that IE9 does not recognize a space preceding a period as a breaking point. As in a list of domain or file extensions. Open the following fiddle in IE9.

http://jsfiddle.net/cssguru/nNnzM/1/

I tried using escape characters, but it didn't help. Any suggestions on a workaround?

like image 529
Adam Youngers Avatar asked Sep 11 '12 19:09

Adam Youngers


1 Answers

It is an annoying feature, but it is probably intentional and not regarded as a bug by the vendor. Instead, it is regarded as implementing Unicode line breaking rules (which are partly rather odd). According to those rules, the period (or FULL STOP as they call it) has line breaking class IS, infix numeric separator, and “When not used in a numeric context, infix separators are sentence-ending punctuation. Therefore they always prevent breaks before.”

To deal with such issues, it is probably best nowadays to insert U+200B ZERO WIDTH SPACE between a normal space and a period, e.g.

.web ​.shop ​.blog ​.nyc ...

U+200B is a control character that allows line breaks in a place where they would not otherwise be allowed.

Old IE versions (IE 6) may have difficulties with this, displaying a symbol of unrepresentable character in place of U+200B. An alternative method, the <wbr> tag, would not have this problem, but it seems that IE 8 and newer often fail to honor this age-old tag (perhaps because it never made its way to any standard, despite its usefulness).

like image 132
Jukka K. Korpela Avatar answered Oct 12 '22 23:10

Jukka K. Korpela