HTML Space Rendering in IE7

D

Dan Groberg

Hey guys,
I was wondering if you could check something out for me. I have
inserted spaces using code onto my site thenews.choate.edu
(for Click Here for RSS Feed under front page image) and it seems to
be showing up as text on my IE7. Can you see if you're having the same
issue? If so, any clue why and/or how it can be fixed?

Thanks a ton in advance,
Dan
 
S

Steven Saunderson

Hey guys,
I was wondering if you could check something out for me. I have
inserted spaces using code onto my site thenews.choate.edu

Hi,
I can't see any #x0020 in your page but do you know you have an extra
<head> and <body> section ?
 
D

Dan

Hey guys,
I was wondering if you could check something out for me. I have
inserted spaces using code onto my site thenews.choate.edu
(for Click Here for RSS Feed under front page image) and it seems to
be showing up as text on my IE7. Can you see if you're having the same
issue? If so, any clue why and/or how it can be fixed?

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. Why encode spaces
anyway? If what you're aiming for is a nonbreaking space, you need
&nbsp; or   ( ) anyway.

A bogus reference you're also using is "•", which is in the range
from 128 through 159 which is undefined for use in HTML (it's in a set
of control characters in Unicode). You seem to be expecting it to
mean the character that is in that position in a proprietary platform-
specific character set.

Some more code that ought to be taken out and shot:

<td><font face="Times New Roman, Times, serif"><font face="Arial,
Helvetica, sans-serif" size="1"></u><a href="/arts.shtml">Arts
&amp; Leisure</a></font></font></td>

Note the setting of a serif font, overridden immediately by a nested
font tag setting a sans-serif one; it's then followed by a closing tag
for an underline element (no opening tag in sight).
 
D

Dan Groberg

Thats odd. I only see one head and one body.

<html>
<head>
<title>The News - The Newspaper of Choate Rosemary Hall</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
..search { font-family: "Trebuchet MS", Verdana; background-color:
#999999; font-size: 8pt; border: 1px #666666 solid}
..searchbox { border: 1px #999999 dotted; font-family: Verdana, Arial,
Helvetica, sans-serif; font-size: x-small; padding-top: 2px; padding-
right: 2px; padding-bottom: 2px; padding-left: 2px; font-weight: bold;
background-image: url(/new/search/grey.jpg); color: #000066}
-->
</style>
<!--
<!-- Copyright 2003 Bontrager Connection, LLC
// See article "Changing Form Action URLs On-The-Fly" linked
// from URL http://willmaster.com/possibilities/archives
// for more information about how to use this code.
function ActionDeterminator()
{
if(document.myform.reason[0].checked == true) {
document.myform.action = 'http://www.google.com/search';
document.myform.method = 'get';
}
if(document.myform.reason[1].checked == true) {
document.myform.action = '/cgi-bin/news/searchnews.pl?dosearch';
}
return true;
}
// -->
<link rel="shortcut icon" href="/favicon.ico" />
</head>

<body bgcolor="#FFFFFF" onLoad="" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" background="/new/bg_overall.jpg"
link="#000066" vlink="#000066"
 
S

Steven Saunderson

J

Jukka K. Korpela

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
&nbsp; 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.
 
E

Ed Mullen

Jukka said:
Scripsit Dan:


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.


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

Oooh! Fabulous! A new acronym is born: HOC = HTML Obfuscation
Contest!!! Can I play?

Nah, never mind. I'm already confused, no need to formalize it.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
I want to die in my sleep like my grandfather did, not screaming and
yelling like the passengers in his car.
 
J

Jukka K. Korpela

Scripsit Ed Mullen:
A new acronym is born: HOC = HTML Obfuscation
Contest!!! Can I play?

Yes, be my guest. I think we just coined a new meaning for the common phrase
"ad hoc solution".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top