<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx</link><description>Visual Studio's IDE will copy code as RTF (Rich Text Format). Web browsers like HTML. So posting code from Visual into blogs means a decent RTF to HTML conversion. And having a technical blog means posting code. So I needed to solve this conversion problem.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#848891</link><pubDate>Fri, 20 Oct 2006 12:27:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:848891</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Agreed that your output looks really good in IE, but the text is too small in FireFox. And don't even bother trying to read it in an Outlook 2007 RSS Feed - the newlines are missing or something.&lt;/p&gt;
&lt;p&gt;&amp;gt; It doesn't handle tabs. You should be using spaces anyways.&lt;/p&gt;
&lt;p&gt;Cool, ok, but why?&lt;/p&gt;</description></item><item><title>re: Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#849502</link><pubDate>Fri, 20 Oct 2006 16:15:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:849502</guid><dc:creator>Ilan Assayag</dc:creator><description>&lt;p&gt;Greate tool, thanks!&lt;/p&gt;
&lt;p&gt;I have made a few changes/fixes as follows:&lt;/p&gt;
&lt;p&gt;1. You can see that the &amp;quot;&amp;amp;lt&amp;quot; and &amp;quot;&amp;amp;gt&amp;quot; were note correctly formatted in the Escape method (look at the resulting HTML - they came out with the actual sign). To fix that I added the following line at the beginning of the Escape method:&lt;/p&gt;
&lt;p&gt;st = st.Replace(&amp;quot;&amp;amp;&amp;quot;, &amp;quot;&amp;amp;amp&amp;quot;);&lt;/p&gt;
&lt;p&gt;2. I personally prefer getting the result in my clipboard (i.e. replacing the RTF to HTML inside the clipboard). Then I can define a simple shortcut on my machine, and have it ready to use in my clipboard, without having to go through a concrete file. Therefore, instead of writing to a file I write to a StringWriter, and then set the text to my clipboard.&lt;/p&gt;
&lt;p&gt;With these changes I can now easily put my code on my Blogger blog, via Windows LiveWriter.&lt;/p&gt;
&lt;p&gt;Great!!!&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;Ilan&lt;/p&gt;</description></item><item><title>re: Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#849511</link><pubDate>Fri, 20 Oct 2006 16:20:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:849511</guid><dc:creator>Tim Dawson</dc:creator><description>&lt;p&gt;Why shouldn't we be using tabs?&lt;/p&gt;</description></item><item><title>re: Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#849741</link><pubDate>Fri, 20 Oct 2006 18:35:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:849741</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;Ilan - after I started outputting it to a file &amp;quot;out.html&amp;quot;, I quickly realized how inconvenient it was. I kept wanting to do the the clipboard --&amp;gt; clipboard, but was too lazy.&lt;/p&gt;
&lt;p&gt;My mistake about the &amp;amp;. I may be using an old version here. I wrote the tool a while ago, and I've copied the binaries around to about 5 different machines of mine. It actually took me about an hour to go find the source. I almost ended up using Reflector...&lt;/p&gt;
</description></item><item><title>Tabs vs. Spaces</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#849751</link><pubDate>Fri, 20 Oct 2006 18:38:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:849751</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;Tim, Matt-&lt;/p&gt;
&lt;p&gt;I was joking about the tabs. I forgot to the &amp;lt;joking&amp;gt;&amp;lt;/joking&amp;gt; tags.&lt;/p&gt;
&lt;p&gt;FWIW, the CLR (and I believe Windows) coding conventions are both 4 spaces instead of tabs, and that's what I personally use. &lt;/p&gt;
&lt;p&gt;Since I wrote the tool for my personal use, and was cutting every corner, I didn't bother with tabs.&lt;/p&gt;
</description></item><item><title>re: Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#855422</link><pubDate>Sun, 22 Oct 2006 15:33:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:855422</guid><dc:creator>.NET Junkie</dc:creator><description>&lt;p&gt;Converting code to HTML was a real pain! I solved my conversion problems using javascript. On my blog all code formatting and code highlighting is now done in the browser, which works pretty well for me.&lt;/p&gt;</description></item><item><title>re: Writing an RTF to HTML converter, posting code in blogs.</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#1284429</link><pubDate>Thu, 14 Dec 2006 16:17:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1284429</guid><dc:creator>Isaac</dc:creator><description>&lt;p&gt;Could you post the regular expressions you used, as the output looks good and valid, but the regular expressions are confusing me!&lt;/p&gt;
&lt;p&gt;Please could you also explain what each line is doing... I know that it would be really boring, but for a person who doesn't know C# (just PHP), it would be wonderful.&lt;/p&gt;</description></item><item><title>Copying HTML  on the clipboard</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#1501625</link><pubDate>Sun, 21 Jan 2007 10:35:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1501625</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;Setting plain text on the clipboard is easy. Call Clipboad.SetText(&amp;quot;Hello!&amp;quot;), and it works great. But&lt;/p&gt;
</description></item><item><title>South African Web Developer Daily News - 2007-03-13</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#1870931</link><pubDate>Tue, 13 Mar 2007 11:36:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1870931</guid><dc:creator>Only In South Africa .COM</dc:creator><description>&lt;p&gt;I was asked yesterday where &amp;quot;South African Web Developer Daily News - 2007-03-12&amp;quot; was and if I had forgotten.&lt;/p&gt;
</description></item><item><title>South African Web Developer Daily News - 2007-03-15</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#1985525</link><pubDate>Thu, 29 Mar 2007 10:36:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1985525</guid><dc:creator>Only In South Africa .COM</dc:creator><description>&lt;p&gt;Today is Microsoft TechDays, the official launch of Vista and Office 2007, so I'll make it short a sweet.&lt;/p&gt;
</description></item><item><title>Posting code to your blog from Visual Studio</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#2173573</link><pubDate>Wed, 18 Apr 2007 15:13:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2173573</guid><dc:creator>Andreas Erben's posts</dc:creator><description>&lt;p&gt;It is painful to post code to your blog without any special considerations. In the worst case you have&lt;/p&gt;
</description></item><item><title>Using Windows live Writer</title><link>http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx#5702192</link><pubDate>Sat, 27 Oct 2007 07:21:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5702192</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;I'm trying out Windows Live Writer. Currently, I do all of my blogging via Frontpage , so this will be&lt;/p&gt;
</description></item></channel></rss>