Posts Tagged ‘html’

¿Habla HTML?

September 1st, 2009
WordPress, WordPress Hack

DISCLAIMER: This post is in no way intended to promote HTML over XHTML or vice-versa. This is simply a solution to a problem for those who may find it useful. Anyone who has used WordPress for any decent length of time probably knows that everything it outputs is in XHTML format. For those who prefer this, that’s just fine. However, for those of us out there that prefer to use HTML instead, we’re pretty much out of luck when it comes to WordPress. As it stands now, there is no easy way to make WordPress output in HTML format. But today I hope to help those people with this simple function I found around the web. First, the code: function HTMLify($buffer) { $xhtml = array(‘/XHTML 1.0 Transitional|XHTML 1.0 Strict|XHTML 1.0 Frameset|XHTML 1.1|XHTML Basic 1.0|XHTML Basic 1.1/’, ‘/xhtml1\/DTD\/xhtml1-transitional.dtd|xhtml1\/DTD\/xhtml1-strict.dtd|xhtml11\/DTD\/xhtml11.dtd|xhtml-basic\/xhtml-basic10.dtd|xhtml-basic\/xhtml-basic11.dtd/’, ‘/\/>/’, ‘/\/\s+>/’, ‘/xmlns=”http:\/\/\/1999\/xhtml”/’, ‘/\s+xmlns=”http:\/\/\/1999\/xhtml”/’, ‘/\s+xml:lang=”(.*)”\s+lang=”(.*)”/’, ‘/\s+>/’); $html = array(‘HTML 4.01′, ‘html4/strict.dtd’, ‘>’, ‘>’, […]

[Continue Reading...]

Obviously Powered by WordPress. © 2003-2013

page counter