<?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>Push cx &#187; markdown</title>
	<atom:link href="http://push.cx/tag/markdown/feed" rel="self" type="application/rss+xml" />
	<link>http://push.cx</link>
	<description>A traveling geek&#039;s blog on development, games, and the web</description>
	<lastBuildDate>Thu, 19 Apr 2012 20:39:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>HTML is Your Markup Language Anyways</title>
		<link>http://push.cx/2009/html-is-your-markup-language-anyways</link>
		<comments>http://push.cx/2009/html-is-your-markup-language-anyways#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:53:24 +0000</pubDate>
		<dc:creator>Peter Harkins</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[bbcode]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[markup languages]]></category>

		<guid isPermaLink="false">http://push.cx/?p=297</guid>
		<description><![CDATA[I hate Wiki markup. I hate BBCode. I hate markdown. I hate the million other custom markup languages that have infested the web. When you&#8217;re using one of these markup languages, you&#8217;re using HTML anyways. Because they must be translated to HTML to serve as web pages, at best they&#8217;re poor translations of HTML. A [...]]]></description>
			<content:encoded><![CDATA[<p>
I hate Wiki markup. I hate BBCode. I hate markdown. I hate the million other custom markup languages that have infested the web.
</p>

<p>
When you&#8217;re using one of these markup languages, you&#8217;re using HTML anyways. Because they must be translated to HTML to serve as web pages, at best they&#8217;re poor translations of HTML. A lot of them are &#8220;parsed&#8221; with regular expressions, leading to all kinds of interesting bugs with nested tags. MediaWiki (the engine behind Wikipedia) uses two apostrophes for &#8221;<b>bold</b>&#8221; and three for &#8221;&#8217;<i>italic</i>&#8221;&#8217;, and then just lets you use HTML for all the cases where these things break. Most markup languages have some passthrough like this to deal with ambiguity or complexity &#8212; so while some markups (not BBCode, which is like HTML in brackets) can claim to be easier to start using, users always end up learning HTML in the end.
</p>

<p>
MediaWiki actually has a decent argument for custom markup in its ability to build <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5tZWRpYXdpa2kub3JnL3dpa2kvSGVscDpUZW1wbGF0ZQ==">templates</a> and fill in particular fields with data. These custom tags aren&#8217;t available in HTML, but there&#8217;s nothing stopping a site from adding its own tags (which may or may not look much like HTML) that are compiled down to HTML in the exact same fashion.
</p>

<p>
Some will argue security, that allowing raw HTML would allow people to perform cross-site scripting and other attacks, or include obscene images, or break the page layout, etc. I&#8217;m not arguing for letting users use HTML without filtering, it&#8217;s absolutely necessary. It&#8217;s difficult to protect against the <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hhLmNrZXJzLm9yZy94c3MuaHRtbA==">wide variety</a> of attacks, but being difficult doesn&#8217;t mean it shouldn&#8217;t be done. There are excellent whitelisting libraries available that remove any excuse about rolling one&#8217;s own, like Ruby&#8217;s <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vcmdyb3ZlL3Nhbml0aXplLw==">Sanitize</a> and PHP&#8217;s <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2h0bWxwdXJpZmllci5vcmcv">HTML Purifier</a>.
</p>

<p>
If you&#8217;re building a site, let your users use HTML (of course, replace newlines with &lt;br&gt; for them). A lot will already know it, there are a million free tutorials out there for them to learn it, and after using your site they&#8217;ll have a useful skill.
</p> <img src="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=297" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://push.cx/2009/html-is-your-markup-language-anyways/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

