<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: XHTML Validation</title>
		<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation</link>
		<description>Gravity Support Forums Topic: XHTML Validation</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:29:07 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/xhtml-validation" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-43169</link>
			<pubDate>Mon, 05 Dec 2011 18:27:48 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">43169@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We've determined the issue is not Genesis.  It's a WordPress core function that is making this change.  There isn't anything we can do to prevent it from happening.  It's applying this change to all content output by the_content() function.&#60;/p&#62;
&#60;p&#62;You can actually see the line of code yourself by opening &#60;a href=&#34;http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/post-template.php#L168&#34; rel=&#34;nofollow&#34;&#62;wp-includes/post-template.php&#60;/a&#62; and going to line 168.&#60;/p&#62;
&#60;p&#62;Here is the line of code that is causing the validation problem:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$content = str_replace(&#38;#39;]]&#38;gt;&#38;#39;, &#38;#39;&#38;amp; g t ;&#38;gt;&#38;#39;, $content);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So the built in the_content() function is replacing all instances of ]]&#38;gt; with ]]&#38;gt; which doesn't make a whole lot of sense.  There has to be a valid reason why this code is in place, although I couldn't tell you what it is.&#60;/p&#62;
&#60;p&#62;The end result is code where this change exists, the code that is output won't validate.&#60;/p&#62;
&#60;p&#62;So Gravity Forms code is correct, but it's being changed by WordPress core so it won't validate. Right now we don't have a solution because when you embed a form into page or post content and display it using the_content() function our code is run before this happens.  &#60;/p&#62;
&#60;p&#62;I've been trying to determine why this code is in core but no luck yet.&#60;/p&#62;
&#60;p&#62;The only solution right now is either..&#60;/p&#62;
&#60;p&#62;1) Ignore the validation errors, invalid code is not &#34;broken&#34;.  It will still work and function, it just means it hasn't passed validation.  At a time when many sites are now mixing XHTML and HTML5 that isn't as big a deal.&#60;/p&#62;
&#60;p&#62;2) Display the form using the function call rather than the shortcode.  This issue only happens when the form is embeded in a page or post that is then output using the_content() function.  If the form is displayed via the function call in a theme template file itself, this doesn't happen.  If a form is displayed via a widget, this also won't happen.  It's only when the_content() comes into play.&#60;/p&#62;
&#60;p&#62;We'll continue to look into this but right now it looks like a core WordPress feature that is manipulating the output negatively.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-43070</link>
			<pubDate>Sun, 04 Dec 2011 17:08:58 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43070@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Related discussion here:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/xhtml-validation-gf_apply_rules&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/xhtml-validation-gf_apply_rules&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42995</link>
			<pubDate>Sat, 03 Dec 2011 02:19:35 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">42995@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The problem is something is manipulating the Gravity Forms code output and changing it before it's rendered on the screen.  This is what is breaking things. &#60;/p&#62;
&#60;p&#62;I asked about Cloudflare because we had another user earlier today who had similar symptoms and it was due to Cloudflare's CDN and a beta feature that was manipulating javascript output as part of their CDN solution.&#60;/p&#62;
&#60;p&#62;So you are experiencing the same issue, but since you aren't using Cloudflare then there is something else on your site that is causing the issue.&#60;/p&#62;
&#60;p&#62;It could be a plugin conflict, or it could be your theme.  The first thing to do is run a complete plugin and theme conflict test by following these instructions:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Let me know how it goes and if you are able to narrow down what is causing the problem.  All we would need to know is where the code is coming from, such as which plugin or your theme.  We can then do some debugging on it and determine what it is doing wrong.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>basecamp101 on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42983</link>
			<pubDate>Fri, 02 Dec 2011 23:04:01 +0000</pubDate>
			<dc:creator>basecamp101</dc:creator>
			<guid isPermaLink="false">42983@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl. No, not using Cloudflare.&#60;br /&#62;
Does it look like a plugin conflict?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42930</link>
			<pubDate>Fri, 02 Dec 2011 17:31:17 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">42930@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Are you currently using CloudFlare (&#60;a href=&#34;http://www.cloudflare.com&#34; rel=&#34;nofollow&#34;&#62;http://www.cloudflare.com&#60;/a&#62;) on that site?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>basecamp101 on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42852</link>
			<pubDate>Fri, 02 Dec 2011 04:38:55 +0000</pubDate>
			<dc:creator>basecamp101</dc:creator>
			<guid isPermaLink="false">42852@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Alex&#60;br /&#62;
I have put the reCaptcha field back into the form &#60;a href=&#34;http://www.basecamp101.com/contact&#34; rel=&#34;nofollow&#34;&#62;http://www.basecamp101.com/contact&#60;/a&#62;&#60;br /&#62;
Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42799</link>
			<pubDate>Thu, 01 Dec 2011 18:17:08 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">42799@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;My forms validate OK with the reCaptcha field in them. Can you add the reCaptcha field to your form so that I can take a look and see where the problem is?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42762</link>
			<pubDate>Thu, 01 Dec 2011 16:44:05 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">42762@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We'll take a look and see if this is something we can change in Gravity Forms, or if this is coming from reCAPTCHA itself.  If it's coming from reCAPTCHA itself, it's a 3rd party service and there is nothing we'll be able to do about it.&#60;/p&#62;
&#60;p&#62;If you want to use captcha then you could use Really Simple Captcha, which is another WordPress plugin.  Install and activate the Really Simple Captcha plugin and it will add additional options to the Captcha field in Gravity Forms.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>basecamp101 on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42730</link>
			<pubDate>Thu, 01 Dec 2011 10:48:06 +0000</pubDate>
			<dc:creator>basecamp101</dc:creator>
			<guid isPermaLink="false">42730@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Cheers mate. Thanks without the reCAPTCHA I validate. If I want to include the reCAPTCHA, what should I do ( in laymans terms).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "XHTML Validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/xhtml-validation#post-42696</link>
			<pubDate>Thu, 01 Dec 2011 02:17:09 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">42696@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you try removing the reCAPTCHA and see if the errors go away?  Looks like something is missing from the CDATA block:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[js]
//&#38;lt;![CDATA[
 var RecaptchaOptions = {theme : &#38;#39;clean&#38;#39;, lang : &#38;#39;en&#38;#39;}; if(parseInt(&#38;#39;5&#38;#39;) &#38;gt; 0) {RecaptchaOptions.tabindex = 5;}
//]]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Should have two opening braces as well, like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[js]
[[//&#38;lt;![CDATA[
 var RecaptchaOptions = {theme : &#38;#39;clean&#38;#39;, lang : &#38;#39;en&#38;#39;}; if(parseInt(&#38;#39;5&#38;#39;) &#38;gt; 0) {RecaptchaOptions.tabindex = 5;}
//]]&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
