I will not bend to Microsoft's will! I will not!

| | Comments (0)
Microsoft has introduced a bug into most versions of Windows Internet Explorer whereby s/(\S)\s+([,.;:/]\S)/$1 $2/g ... that is, if you have HTML that matches that, this .is .my .text .nyah .nyah .nyah, then the spaces will be replaced by non-breaking spaces when the page is rendered.

Now, web browsers usually stretch out a page horizontally to accomodate non-breaking spaces, and MSIE is no exception. So any user can stretch out a page on a site that allows comments posting by just inserting a "." (or , ; : /) before each word.

So what to do about it? I tried various things like converting spaces to other characters (like the new ‌, thanks TorgoX) but it didn't do the trick. The only thing that works is to either disallow such text, which is unreasonable -- we won't let Microsoft's bug dictate that people can't use PERIODS in their posts -- or we could match the pattern and insert an   (yes, you're reading right, inserting a non-breaking space actually tells MSIE to break where it previously wasn't breaking! wooooo!), but that too is munging a user's comment text because of a Microsoft bug. It's less intrusive than disallowing overabundance of periods, but it is still annoying, and we don't want to do it.

And of course, we get a lot of people saying there's a "bug" in Slash. It is a bug in MSIE. There is no bug in Slash relating to this. To say otherwise means you are a liar, or you are ignorant.

So we are stuck with either munging user input or just letting Windows MSIE users deal with it, and optionally complain to Microsoft. For now, we've chosen the latter. use.perl.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on March 4, 2002 5:03 PM.

Nobody knows the troubles sysreads was the previous entry in this site.

SOAP is here, wash yourself is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.