bubazoo Posted October 5, 2006 Share Posted October 5, 2006 Hey guys,I am having a problem with my blog. wordpress specifically.The content (the actual blog post) isn't following XHTML standards, I get 8 errors on one page, 16 on another, and there all problems I can't do nothing about, so I tried this..<![CDATA[ <div class="post"> the_content(); </div> ]]>but for some reason (have no idea why) the browser isn't rendering whats inside the CDATA tags,why?? and what can I do about it?thanks Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 5, 2006 Share Posted October 5, 2006 Can we see your blog please? Link to comment Share on other sites More sharing options...
boen_robot Posted October 5, 2006 Share Posted October 5, 2006 Your blog is most probably read as HTML (MIME type text/html) even though it follows the XHTML syntax."<![CDATA[" is only recognized in XHTML based (MIME type application/xhtml+xml) pages. The validator may not report an error on this, because that's a valid syntax for XML, but it's just not acceptable with the text/html MIME type.Note however, that if you use "<![CDATA[" in XHTML, this will render it's content on screen as text, not ignore it as a comment will. So your content of: <![CDATA[ <div class="post">the_content();</div>]]> will be the equivalent of that in the source: <div class="post">the_content();</div> And what the user will see will be the following TEXT: <div class="post">the_content();</div> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now