<?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: sprintf() Bug (and Fix)</title>
		<link>https://legacy.forums.gravityhelp.com/topic/sprintf-bug-and-fix</link>
		<description>Gravity Support Forums Topic: sprintf() Bug (and Fix)</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 21:41:30 +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/sprintf-bug-and-fix" rel="self" type="application/rss+xml" />

		<item>
			<title>Lee Blue on "sprintf() Bug (and Fix)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/sprintf-bug-and-fix#post-4079</link>
			<pubDate>Wed, 17 Mar 2010 11:43:27 +0000</pubDate>
			<dc:creator>Lee Blue</dc:creator>
			<guid isPermaLink="false">4079@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Due to the lack of support of a static text field, I used a section break to display my note in the description field. When I saved the form, I started getting this error: &#60;/p&#62;
&#60;p&#62;Warning: sprintf() [FUNCTION.SPRINTF]: Too few arguments in [...]wp-content/plugins/gravityforms/form_display.php on line 603&#60;/p&#62;
&#60;p&#62;After poking around a bit I realized that the description had a &#34;%&#34; in it which was breaking the sprintf() function. Rather than put a double % in my text (since it was for a client) I modified gravityforms/form_display.php line 603 to be:&#60;/p&#62;
&#60;p&#62;$field_content = sprintf(&#34;%s&#38;lt;h2 class='gsection_title'&#38;gt;%s&#38;lt;/h2&#38;gt;&#34;.str_replace(&#34;%&#34;,&#34;%%&#34;,$description), $admin_buttons,  esc_html($field_label));&#60;/p&#62;
&#60;p&#62;So it will automatically escape a % in the description now. &#60;/p&#62;
&#60;p&#62;I hope this post serves as a bug report as well as a request for a) static text fields and b)  an official fix for escaping descriptions.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
