<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff Malterre &#187; invalid markup</title>
	<atom:link href="http://www.jeffmalterre.com/tag/invalid-markup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffmalterre.com</link>
	<description>accessible web programmer, SEO specialist, e-commerce professional</description>
	<lastBuildDate>Tue, 05 Oct 2010 18:23:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>TweetSuite for WordPress Plugin &#8211; W3C Validation Error: Fixed</title>
		<link>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/</link>
		<comments>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 19:53:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[invalid markup]]></category>
		<category><![CDATA[tweetsuite]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=947</guid>
		<description><![CDATA[TweetSuite is a great plugin, it has a widget for displaying your latest tweets, displays tweetbacks, and lets you add in links to tweet or re-tweet a post on your blog. There&#8217;s more then a few things that need to be fixed with this plugin (ref: TweetSuite Errors and Troubleshooting), right now I&#8217;m just going [...]]]></description>
			<content:encoded><![CDATA[<p>TweetSuite is a great plugin, it has a widget for displaying your latest tweets, displays tweetbacks, and lets you add in links to tweet or re-tweet a post on your blog.  There&#8217;s more then a few things that need to be fixed with this plugin (ref: <a href="http://www.geoffmanning.com/twitter/tweetsuite-errors-and-troubleshooting/">TweetSuite Errors and Troubleshooting</a>), right now I&#8217;m just going to focus on some markup validation errors I came across.</p>
<p>The widget for displaying your latest tweets lists each tweet enclosed with li (listed item) tags.  Unfortunately, these listed items have no unordered or ordered list parent tag.  This causes a the markup to be invalid.  To fix this is quite easy&#8230;</p>
<p><span id="more-947"></span></p>
<p>Open <strong>TweetSuite.php</strong> and goto <strong>line 907</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>907
908
909
910
911
912
913
914
915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$buff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> order by datetime desc limit <span style="color: #006699; font-weight: bold;">$max</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$buff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tweet</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/y h:ia'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">datetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>and add in the appropriate opening and closing tags&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>907
908
909
910
911
912
913
914
915
916
917
918
919
920
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$buff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> order by datetime desc limit <span style="color: #006699; font-weight: bold;">$max</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$buff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tweet</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/y h:ia'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">datetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will enclose all the listed items with an unordered list tag, thus fixing the invalid markup.</p>
<p>The other problem I found was that some of the tweets had special characters (such as an ampersand) that were not converted to the specific html character code.  This will also cause validation errors.  To convert any special characters to use the appropriate special character code, we&#8217;ll need to make a real simple change.</p>
<p>Open <strong>TweetSuite.php</strong> and goto <strong>line 915</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>and change it to&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will now convert any special characters in a tweet to use special character code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Wall plugin + Elegant Grunge theme &#8211; fixed W3C xHTML validation error</title>
		<link>http://www.jeffmalterre.com/2008/11/20/wp-wall-plugin-elegant-grunge-theme-fixed-w3c-xhtml-validation-error/</link>
		<comments>http://www.jeffmalterre.com/2008/11/20/wp-wall-plugin-elegant-grunge-theme-fixed-w3c-xhtml-validation-error/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 15:48:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[sibble.com]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[elegant grunge]]></category>
		<category><![CDATA[invalid markup]]></category>
		<category><![CDATA[wp wall]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=641</guid>
		<description><![CDATA[I recently installed a plugin called WP Wall (you should now notice it in the sidebar.)  I&#8217;m pretty happy with how it worked out, but I noticed there was a problem validating my markup after installing this plugin. The problem was simple, an input tag had and ID and name of &#8220;page&#8221;.  This ID was [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed a plugin called <a title="WP Wall - WordPress Plugin" href="http://www.prelovac.com/vladimir/wordpress-plugins/wp-wall" target="_blank">WP Wall</a> (you should now notice it in the sidebar.)  I&#8217;m pretty happy with how it worked out, but I noticed there was a problem validating my markup after installing this plugin.</p>
<p>The problem was simple, an input tag had and ID and name of &#8220;page&#8221;.  This ID was already in use by my <a title="Wordpress" href="http://www.wordpress.org" target="_blank">WordPress</a> theme (<a title="Elegant Grunge - WordPress theme" href="http://michael.tyson.id.au/wordpress/themes/elegant-grunge/" target="_blank">Elegant Grunge</a>), and as we all know no two tags can have the same ID.  Generally speaking, <em>page</em> is a pretty common identifier and I&#8217;m not surprised that it was already in use.</p>
<h3>To fix:</h3>
<p style="padding-left: 30px;"><strong>Open wp-wall.php, and go to line 243</strong></p>
<p style="padding-left: 60px;">Change:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>243
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">'&amp;lt;input type=&quot;hidden&quot; name=&quot;page&quot; id=&quot;page&quot;value=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&amp;gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="padding-left: 60px;">To:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>243
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">'&amp;lt;input type=&quot;hidden&quot; name=&quot;wallpage&quot; id=&quot;wallpage&quot; value=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&amp;gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="padding-left: 30px;"><strong>Open wp-wall.js.php, and go to line 117</strong></p>
<p style="padding-left: 60px;">Change:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>117
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> page<span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wallcomments #page'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="padding-left: 60px;">To:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>117
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> page<span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wallcomments #wallpage'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I changed the identifier from <em>page</em> to <em>wallpage</em>, but you can use anything you like as long as something else isn&#8217;t already using that specific identifier.  Hopefully this won&#8217;t cause any conflicts within the WP Wall plugin, only time will tell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2008/11/20/wp-wall-plugin-elegant-grunge-theme-fixed-w3c-xhtml-validation-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

