Reply to Re: HTML Space Rendering in IE7

Your name:

Reply:


Posted by Jukka K. Korpela on 01/30/07 22:49

Scripsit Dan:

> I saw some code like "&#x20&#x20&#x20&#x20", which leaves out the
> semicolon; it's a good idea to use the semicolon even if in some cases
> (maybe this one) it's permissible to leave it out.

It's a particularly good idea because the authors of IE 7 decided to make it
even less HTML 4.01 conformant than it used to be in this respect. By all
HTML specifications up to and including HTML 4.01, you can omit the REFC,
reference close (that's SGML jargon for the semicolon here), whenever the
character reference is not followed by a name character. And "&" ain't no
name character by HTML rules. XHTML changes this by making the semicolon
required, and IE 7, madly enough, decided to follow suit - despite it's
unwillingness to support XHTML! As if this were not mad enough, IE 7 imposes
the rule on some types of character or entity references only.

To maintain mental sanity, thus, close your references with the magic
semicolon. Too bad there are probably millions of pages that lack such
semicolons; for no good reason, IE 7 decided to break them.

> Why encode spaces anyway?

Beats me. To participate in an HTML obfuscation contest? :-)

> If what you're aiming for is a nonbreaking space, you need
>   or   ( ) anyway.

Well, I can write the no-break character as such. A single, nice-looking
character (which drives chicks crazy, you know). On my keyboard, I just hit
AltGr space for this (when I have the keyboard set to Finnish Multilingual).
Of course I need to know how to work with a document containing such
characters as plain data, but I do - I've done that since the early 1990s.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация