Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

I was bitten by HTML reformat

I've been smugly reading about reformatting HTML thinking that I'd never do anything fancy enough for it to matter. I never though it would mess with an HTML file.

Then I imported an HTML file (from a CityDesk site) that had an inline stylesheet. I viewed it normal, then HTML, then normal again and after a panic, I realized that CityDesk stripped that stylesheet right out. It also stripped out this (which I guess I understand)

<META http-equiv=Content-Language content=en-gb>
<META content="Fog Creek CityDesk 2.0.19" name=generator>
<META content=212F65FB/141 name=citydesk>

tk
Sunday, August 31, 2003

It stripped out <style>...</style> completely? hmmm
I wonder what is wrong with that?

Joel Goldstick
Monday, September 01, 2003

It stripped everything out of the <head> except the title.

I ended up putting the style stuff into a variable and putting into the template. I'll have to try an inline style sheet in a template and see what happens.

tk
Monday, September 01, 2003

I'd love to see the original HTML that caused the problem, if you still have it anywhere (email me is sufficient)

Joel Spolsky
Tuesday, September 02, 2003

This is the page I imported:

http://tk-jk.net/GTsoccer/blog/20032004/Fall2003recruiting.html

The plan was to modify it and make it a redirect from a school site to the external site so we didn't have to mess with secure FTP.

tk
Tuesday, September 02, 2003

Terry, that page has the <body> tag in the wrong place... it's above the META and STYLE tags but it should be above them. Because META and STYLE tags are not allowed in BODY but only in HEAD they get removed.

You can fix it by moving the </head> and the <body> below the </style>.

Joel Spolsky
Wednesday, September 03, 2003

J, Thankyou. What I don't understand is that the page I imported was published by CityDesk. All I did was import it. I didn't do anything to a body tag at any time. Did CityDesk make a publishing mistake, or did I, or ...

tk
Wednesday, September 03, 2003

I was bitten by the same "thing" with the same effect, as reported earlier. Joel was kind enough to offer his assistance, but I choosed to use good old CD1 instead.
This is the page (among others) that CD2 choked on:
http://www.baskerville.dk/Linksliste/Links2/fog0000000008.html

Jorgen Brenting
Wednesday, September 03, 2003

*  Recent Topics

*  Fog Creek Home