<?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"
	>
<channel>
	<title>Comments on: RedYourSite.com</title>
	<atom:link href="http://builtbydave.co.uk/2008/04/28/redyoursitecom/feed/" rel="self" type="application/rss+xml" />
	<link>http://builtbydave.co.uk/2008/04/28/redyoursitecom/</link>
	<description>The wireframe of a blog.</description>
	<pubDate>Fri, 04 Jul 2008 19:15:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: John Montgomery</title>
		<link>http://builtbydave.co.uk/2008/04/28/redyoursitecom/#comment-241</link>
		<dc:creator>John Montgomery</dc:creator>
		<pubDate>Tue, 29 Apr 2008 11:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://builtbydave.co.uk/?p=133#comment-241</guid>
		<description>And obviously that just ate my code - guess you'll have to view source and look between the pre tags to see it properly.</description>
		<content:encoded><![CDATA[<p>And obviously that just ate my code - guess you&#8217;ll have to view source and look between the pre tags to see it properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Montgomery</title>
		<link>http://builtbydave.co.uk/2008/04/28/redyoursitecom/#comment-240</link>
		<dc:creator>John Montgomery</dc:creator>
		<pubDate>Tue, 29 Apr 2008 11:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://builtbydave.co.uk/?p=133#comment-240</guid>
		<description>I'd split the html into bits that we can safely replace within and bits that can't be safely replaced, then do the replacement and then join the whole lot together again.  Something like:


var html = "red &lt;a href='' rel="nofollow"&gt;red&lt;/a&gt; something else redder";

// should minimally match links (extend to add more tags)
var donotwant=new RegExp(/(&#60;a.*?)/);
// separator will be included in pieces, as we add () in the regexp
var pieces = html.split(donotwant);
for ( var i = 0; i &#60; pieces.length; i++ ) {
  var piece = pieces[i];
  if ( !donotwant.test(piece) ) {
     // do the actual replacement
     pieces[i]=piece.replace('red','(red)');
  } 
}

// join it back together to get final html
html = pieces.join('');


Well something like that anyway.  A bit more work would be required, but that's the basic approach.</description>
		<content:encoded><![CDATA[<p>I&#8217;d split the html into bits that we can safely replace within and bits that can&#8217;t be safely replaced, then do the replacement and then join the whole lot together again.  Something like:</p>
<p>var html = &#8220;red <a href='' rel="nofollow">red</a> something else redder&#8221;;</p>
<p>// should minimally match links (extend to add more tags)<br />
var donotwant=new RegExp(/(&lt;a.*?)/);<br />
// separator will be included in pieces, as we add () in the regexp<br />
var pieces = html.split(donotwant);<br />
for ( var i = 0; i &lt; pieces.length; i++ ) {<br />
  var piece = pieces[i];<br />
  if ( !donotwant.test(piece) ) {<br />
     // do the actual replacement<br />
     pieces[i]=piece.replace(&#8217;red&#8217;,'(red)&#8217;);<br />
  }<br />
}</p>
<p>// join it back together to get final html<br />
html = pieces.join(&#8221;);</p>
<p>Well something like that anyway.  A bit more work would be required, but that&#8217;s the basic approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Mac Switch supports (red) : The Mac Switch</title>
		<link>http://builtbydave.co.uk/2008/04/28/redyoursitecom/#comment-235</link>
		<dc:creator>The Mac Switch supports (red) : The Mac Switch</dc:creator>
		<pubDate>Mon, 28 Apr 2008 12:37:33 +0000</pubDate>
		<guid isPermaLink="false">http://builtbydave.co.uk/?p=133#comment-235</guid>
		<description>[...] If you run a site, I suggest you do the same. Also note that there is apparently some issue with the Javascript still and the authors are looking for help. See this blog post here. [...]</description>
		<content:encoded><![CDATA[<p>[...] If you run a site, I suggest you do the same. Also note that there is apparently some issue with the Javascript still and the authors are looking for help. See this blog post here. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
