views:

19

answers:

1

I run tidy as a plugin in gedit.

It uncloses self-closing tags like <br> and <img>

e.g. <br /> goes to <br> and <img src="somewhere" /> goes to <img src="somewhere">

Can I make tidy in gedit respect these self-closing tags or should I not be using these tags?

+1  A: 

In HTML, those elements shouldn't have a self-closing / at the end.

If you don't need to be using XHTML (and it sounds like you don't) then I would just use an HTML doctype and let Tidy do what it's already doing. Otherwise, you need to tell Tidy that you want it to use XHTML rules instead of HTML rules

Gareth
Yep, I turned on XHTML-output in tidy and it closed the tags.