comfortablementeadormecido | 1 Jul 2006 03:46
Picon

HTML output error

I've found, what I think is some kind of bug or error on the code
generated when compiling a form.
I compiled some simple form using the sawfisch-crux theme and I found
that the images where not displayed. Then I tried with the xp theme
with the same results.

When looking at the code, at the function output of the generated form
class, there's something wrong with the images URIs.

<img style=\"display: block\" src=\""."\n      ".$this->images."\n   
"."lighttopleft.gif\" width=\"5\" height=\"5\" alt=\"\" />

Note that $this->images has the path to where all images are stored.
Take special note on the new line character and the spaces following
inmediately.

HTMLTidy gives two warnings: "discarding new line in URI reference"
and "escaping malformed URI reference"

deleting the new line corrects the first warning but still the images
are not displayed.
Eliminating the spaces will do the trick.

This makes me think about accessibility and how accessible is the code
generated by the metastorage tool. I know by experience that all the
javascript code used by the forms class is cross-browser compatible,
but I think that the HTML accessibility has not been considered as much. 

I would need to make more tests, but my guess is that the HTML code
generated by the metastorage themes could be improved to be more
(Continue reading)

Manuel Lemos | 3 Jul 2006 04:17
Picon
Favicon

Re: HTML output error

Hello,

on 06/30/2006 10:46 PM comfortablementeadormecido said the following:
> I've found, what I think is some kind of bug or error on the code
> generated when compiling a form.
> I compiled some simple form using the sawfisch-crux theme and I found
> that the images where not displayed. Then I tried with the xp theme
> with the same results.
> 
> When looking at the code, at the function output of the generated form
> class, there's something wrong with the images URIs.
> 
> <img style=\"display: block\" src=\""."\n      ".$this->images."\n   
> "."lighttopleft.gif\" width=\"5\" height=\"5\" alt=\"\" />
> 
> Note that $this->images has the path to where all images are stored.
> Take special note on the new line character and the spaces following
> inmediately.
> 
> HTMLTidy gives two warnings: "discarding new line in URI reference"
> and "escaping malformed URI reference"
> 
> deleting the new line corrects the first warning but still the images
> are not displayed.
> Eliminating the spaces will do the trick.

I just tried it here and I could not reproduce the problem.

I suspect that you have edited the templates with text editor that
forces line breaks and adds automatic indentation spaces.
(Continue reading)


Gmane