forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gav...." <>
Subject character entities
Date Sat, 21 Jan 2006 14:41:45 GMT
I wrote earlier :-

| P.S-
| Creating an empty hook has the side effect of a self closing div - 
| inlvalid and messes
| up the rest of the page.
| e.g.
| <forrest:hook name="headlines"></forrest:hook>
| creates
| <div id="headlines />
| instead of
| <div id="headlines"></div>

This made me have a look around, and as a side-effect found an old
thread regarding this back in July 2005, just before my time I think.

The discussion also brought up &#160; and its possible side effects
of creating  .

I am seeing  a lot lately and so think the problem is still not solved.

For instance it is the result of siteinfo-last-published.ft.

Last Published:Â 01/21/2006 17:53:37

This line is created from the contract here :-

<xsl:template name="siteinfo-last-published-body">
        <script type="text/javascript">document.write("<i18n:text >Last 
Published:</i18n:text>&#160;" + document.lastModified);</script>

I have a theory.

in the code the &#160; is right next to a " (quote). The entity number for " 
(quote) is &#34;

I had a crazy thought that maybe they were adding together somehow. 

&#160; + &#34; = &#194;

Guess what &#194; is equal to , yup :-


Anyway, in the example contract code above, removing &#160; and putting a 
real space in there cures it and the space
is preserved no problem as it is enclosed between the quotes.

I copied the contract to my /pili/html/ directory and it now renders 

Have I missed something here or was it that simple ?

Still looking into the empty <div> problem but again may be &#160; related 
I'm not sure.
There was talk in the archives it was cured, but seems to be back.



No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.21/236 - Release Date: 20/01/2006

View raw message