[Cdash] encoding-independent non-breaking space

Markus Grabner grabner at icg.tugraz.at
Wed Sep 24 14:39:09 UTC 2008


	Hi!

    The HTML entity " " occurs at several places in the XSL stylesheets. 
It is interpreted by the XSLT processor and transmitted to the client as a 
single byte (hex code 0xa0), which is a non-breaking space in ISO 8859-1 
encondig. On my system, however, for some reason Firefox chooses to display 
the cdash pages as UTF-8, where this code is rendered incorrectly (as a 
question mark, see attached screenshot). While some effort could be made to 
make cdash and the web browser agree on a common encoding, a more general 
solution would be to transmit the encoding-independent HTML entity " " 
instead. According to a comment on "http://www.php.net/xsl", the "hard way" 
(but least dependent on external stuff) to do so is to replace all

<xsl:text> </xsl:text>

by

<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>

or, as an "sed" command (in a single line):

sed -i 's/<xsl:text> <\/xsl:text>/<xsl:text 
disable-output-escaping="yes">\&nbsp;<\/xsl:text>/g' *.xsl

This fixes all " " (except the one in "viewSite.xsl", line 61, where I 
believe the <xsl:text> tag is missing), i.e., the non-breaking spaces are 
displayed correctly and indeed transmitted as " ", which can be 
confirmed in the HTML source code view of the browser.

Is there a particular reason why the " " code was chosen instead of 
the " "? If not, I propose to apply this change to the cdash repository.

	Kind regards,
		Markus


-- 
Markus Grabner - Computer Graphics and Vision
Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria
Phone: +43/316/873-5041, Fax: +43/316/873-5050
WWW: http://www.icg.tugraz.at/Members/grabner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nbsp.png
Type: image/png
Size: 10456 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cdash/attachments/20080924/a5ec921f/attachment-0002.png>


More information about the CDash mailing list