<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Posting Code in WordPress (and comments!)</title>
	<atom:link href="http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/</link>
	<description>mikeage.net</description>
	<lastBuildDate>Sun, 29 Jan 2012 15:29:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Eric</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-91294</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-91294</guid>
		<description>great fix.  why is this not integrated into Code Markup yet?  hey btw do you guys know why it has started sticking rel=&quot;nofollow&quot; into markup?  it only does it in a comment.  even if markup=&quot;none&quot;.  kinds of defeats the purpose.</description>
		<content:encoded><![CDATA[<p>great fix.  why is this not integrated into Code Markup yet?  hey btw do you guys know why it has started sticking rel=&#034;nofollow&#034; into markup?  it only does it in a comment.  even if markup=&#034;none&#034;.  kinds of defeats the purpose.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo de Araujo</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-62962</link>
		<dc:creator>Rodrigo de Araujo</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-62962</guid>
		<description>Congratulations! That´s nice. Well done and good looking, it´s also easy to install, but I´m still looking for some more up-to-date stats map. 

I will give this widget a little more time to satisfy me. Let´s see what happens.</description>
		<content:encoded><![CDATA[<p>Congratulations! That´s nice. Well done and good looking, it´s also easy to install, but I´m still looking for some more up-to-date stats map. </p>
<p>I will give this widget a little more time to satisfy me. Let´s see what happens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bzeurghk</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-50672</link>
		<dc:creator>Bzeurghk</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-50672</guid>
		<description>Thanks!,</description>
		<content:encoded><![CDATA[<p>Thanks!,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claire</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-49990</link>
		<dc:creator>Claire</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-49990</guid>
		<description>For this fix to work with the newest version of Code Markup, the last line of your patch needs to be changed to:

&lt;code&gt;add_filter(&#039;comment_text&#039;, &#039;tguy_cmu_tidy_code&#039;, &#039;11&#039;);&lt;/code&gt;

(&lt;code&gt;tguy_cmu_fix_quotes&lt;/code&gt; seems to have been upgraded :))</description>
		<content:encoded><![CDATA[<p>For this fix to work with the newest version of Code Markup, the last line of your patch needs to be changed to:</p>
<p><code>add_filter('comment_text', 'tguy_cmu_tidy_code', '11');</code></p>
<p>(<code>tguy_cmu_fix_quotes</code> seems to have been upgraded <img src='http://mikeage.net/content/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Miller</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-1724</link>
		<dc:creator>Mike Miller</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-1724</guid>
		<description>Thanks. There&#039;s one remaining issue that needs to be fixed -- I don&#039;t think wordpress should be allowed to insert rel=&quot;nofollow&quot; into the href&#039;s wrapped by code. However, I can&#039;t just remove all rel=&quot;nofollow&quot; lines, because the user may have put them there. 

I&#039;ll look into it, but I&#039;m not sure exactly how to do this.</description>
		<content:encoded><![CDATA[<p>Thanks. There&#039;s one remaining issue that needs to be fixed &#8212; I don&#039;t think wordpress should be allowed to insert rel=&#034;nofollow&#034; into the href&#039;s wrapped by code. However, I can&#039;t just remove all rel=&#034;nofollow&#034; lines, because the user may have put them there. </p>
<p>I&#039;ll look into it, but I&#039;m not sure exactly how to do this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Miller</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-1725</link>
		<dc:creator>Mike Miller</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-1725</guid>
		<description>Ok. On line 109, there&#039;s a check &lt;code&gt;if ($allow == &#039;none&#039; &#124;&#124; $allow == &#039;&#039;)&lt;/code&gt;. If you add the following below that, we can remove rel=&quot;nofollow&quot; from within the &lt;code&gt; tag. Normal links will still have rel=&quot;nofollow&quot;. 

&lt;pre&gt;&lt;code allow=&quot;none&quot;&gt;$escapedContent = preg_replace(&quot;/(&lt;a [^ rel=&quot;nofollow&quot;&gt;]*( &#124;\t&#124;\n)rel=)(&#039;&#124;\&quot;)(([^\3]*( [^ \3]*)*) )?nofollow/&quot;, &quot;$1$3$5&quot;, $escapedContent);
$escapedContent = preg_replace(&quot;/(&lt;a [^ rel=&quot;nofollow&quot;&gt;]*)( &#124;\t&#124;\n)rel=(&#039;&#039;&#124;\&quot;\&quot;)([^&gt;]*&gt;)/&quot;, &quot;$1$4&quot;, $escapedContent);&lt;/code&gt;&lt;/pre&gt;

The only problem with this is that if the user himself puts in rel=&quot;nofollow&quot;, it won&#039;t be kept. I&#039;m not sure (yet) how to fix that.

These regular expressions were taken from the &lt;a href=&quot;http://www.semiologic.com/software/dofollow/&quot; rel=&quot;nofollow&quot;&gt;DoFollow&lt;/a&gt; plugin.</description>
		<content:encoded><![CDATA[<p>Ok. On line 109, there&#039;s a check <code>if ($allow == 'none' || $allow == '')</code>. If you add the following below that, we can remove rel=&#034;nofollow&#034; from within the &lt;code&gt; tag. Normal links will still have rel=&#034;nofollow&#034;. </p>
<pre><code allow="none">$escapedContent = preg_replace("/(<a [^ rel="nofollow">]*( |\t|\n)rel=)('|\")(([^\3]*( [^ \3]*)*) )?nofollow/", "$1$3$5", $escapedContent);
$escapedContent = preg_replace("/(</a><a [^ rel="nofollow">]*)( |\t|\n)rel=(''|\"\")([^>]*>)/", "$1$4", $escapedContent);</a></code></pre>
<p>The only problem with this is that if the user himself puts in rel=&#034;nofollow&#034;, it won&#039;t be kept. I&#039;m not sure (yet) how to fix that.</p>
<p>These regular expressions were taken from the <a href="http://www.semiologic.com/software/dofollow/" rel="nofollow">DoFollow</a> plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bennett</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-1723</link>
		<dc:creator>Bennett</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-1723</guid>
		<description>Thanks Mike! Great work. Your enhancement will be in the next version of Code Markup.</description>
		<content:encoded><![CDATA[<p>Thanks Mike! Great work. Your enhancement will be in the next version of Code Markup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Miller</title>
		<link>http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/comment-page-1/#comment-1721</link>
		<dc:creator>Mike Miller</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/#comment-1721</guid>
		<description>See? It works!

Regular: &lt;code&gt;&lt;a href=&quot;http://dont.link.this&quot; rel=&quot;nofollow&quot;&gt;Link?&lt;/a&gt;&lt;/code&gt;
With allow=&quot;none&quot;: &lt;code allow=&quot;none&quot;&gt;&lt;a href=&quot;http://dont.link.this&quot; rel=&quot;nofollow&quot;&gt;Link?&lt;/a&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>See? It works!</p>
<p>Regular: <code><a href="http://dont.link.this" rel="nofollow">Link?</a></code><br />
With allow=&#034;none&#034;: <code allow="none"><a href="http://dont.link.this" rel="nofollow">Link?</a></code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

