[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1763
  • Last Modified:

Tidy - avoid removal of empty elements

Hello,

we'd like to avoid removing empty elements with tidy, such as:
<span class="test"></span>

Open in new window


since we need it for several css hacks. We know the option to just include an escaped whitespace:
<span class="test">&nbsp;</span>

Open in new window


but that's not really an option. Also we cannot add name or id attributes, since otherwise any single span element would need a unique name.

Is there a way in the tidy options to configure NOT to remove empty tags?

Thanks and bests
0
semantique
Asked:
semantique
1 Solution
 
pg-expertCommented:
what you are using is the best option to avoid tidy removing empty tags.

~PG
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now