fix pad function for better compatibility
Conditional comments are now treated as autoclosing tags