Removing uneeded blank character in HTML tags?

Removing uneeded blank character in HTML tags?

autor Séverin TERRIER -
Počet odpovědí: 1
Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Testers Obrázek: Translators
Hi,

I'm not a developper, but i'm curious, and sometimes see some things that feel strange to me.

I had a look at the coding style, and found nothing about HTML tags, and uneeded blanks inside them.

I think (but i'm perhaps wrong) that, for exemple, "</tr >" should be replaced by "</tr>" (without space). Yes, no, not important ?

If yes, perhaps it would be a good idea to dig into the code to update these sort of things (also for td and so on).

Séverin
Průměr hodnocení: -
V odpovědi na Séverin TERRIER

Re: Removing uneeded blank character in HTML tags?

autor Mark Sharp -
Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers
I think most browsers are pretty forgiving of this - it's not like the old days of strict XML.
Moodle doesn't always have control of html - e.g. when you type text in the text editor that's html. You could just as easily paste html from somewhere else.

Moodle's Atto text editor does have a HTML view, which will highlight any errors in the HTML. As as you can see it's not highlighting a space in the </tr>, but it is highlighting a tag closure that doesn't have an opener.