<?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>Doing &#38; Done &#187; javascript</title>
	<atom:link href="http://doing.liduan.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://doing.liduan.com</link>
	<description>Record and Store</description>
	<lastBuildDate>Thu, 11 Feb 2010 11:19:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>enable javascript and other HTML element&#8230;</title>
		<link>http://doing.liduan.com/2009/07/10/enable-javascript-and-other-html-element/</link>
		<comments>http://doing.liduan.com/2009/07/10/enable-javascript-and-other-html-element/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:00:39 +0000</pubDate>
		<dc:creator>liduan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress mu]]></category>

		<guid isPermaLink="false">http://doing.liduan.com/2009/07/10/enable-javascript-and-other-html-element/</guid>
		<description><![CDATA[enable javascript and other HTML element in wordpress MU. open wp-includes/kses.php find following line

$allowedposttags = array(

add following codes

		&#039;script&#039; =&#62; array(
&#039;type&#039; =&#62; array(),
&#039;src&#039; =&#62; array(),
&#039;language&#039; =&#62; array()
),
&#039;noscript&#039; =&#62; array(
),
&#039;object&#039; =&#62; array(
&#039;height&#039; =&#62; array(),
&#039;width&#039; =&#62; array(),
&#039;type&#039; =&#62; array(),
&#039;data&#039; =&#62; array(),
&#039;allowfullscreen&#039; =&#62; array(),
&#039;id&#039; =&#62; array()
),
&#039;param&#039; =&#62; array(
&#039;name&#039; =&#62; array(),
&#039;value&#039; =&#62; array()
),
&#039;embed&#039; =&#62; array(
&#039;width&#039; =&#62; array(),
&#039;height&#039; =&#62; array(),
&#039;type&#039; =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>enable javascript and other HTML element in wordpress MU. open wp-includes/kses.php find following line</p>
<pre class="brush: php">
$allowedposttags = array(
</pre>
<p>add following codes</p>
<pre class="brush: php">
		&#039;script&#039; =&gt; array(
&#039;type&#039; =&gt; array(),
&#039;src&#039; =&gt; array(),
&#039;language&#039; =&gt; array()
),
&#039;noscript&#039; =&gt; array(
),
&#039;object&#039; =&gt; array(
&#039;height&#039; =&gt; array(),
&#039;width&#039; =&gt; array(),
&#039;type&#039; =&gt; array(),
&#039;data&#039; =&gt; array(),
&#039;allowfullscreen&#039; =&gt; array(),
&#039;id&#039; =&gt; array()
),
&#039;param&#039; =&gt; array(
&#039;name&#039; =&gt; array(),
&#039;value&#039; =&gt; array()
),
&#039;embed&#039; =&gt; array(
&#039;width&#039; =&gt; array(),
&#039;height&#039; =&gt; array(),
&#039;type&#039; =&gt; array(),
&#039;src&#039; =&gt; array(),
&#039;allowfullscreen&#039; =&gt; array()
),
&#039;coolcode&#039; =&gt; array(
&#039;lang&#039; =&gt; array()
),
//over
</pre>]]></content:encoded>
			<wfw:commentRss>http://doing.liduan.com/2009/07/10/enable-javascript-and-other-html-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>format &#8216;12345&#8242; to &#8216;12,345&#8242;  javasc &#8230;</title>
		<link>http://doing.liduan.com/2009/07/01/format-12345-to-12345javasc/</link>
		<comments>http://doing.liduan.com/2009/07/01/format-12345-to-12345javasc/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 10:55:16 +0000</pubDate>
		<dc:creator>liduan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://doing.liduan.com/2009/07/01/format-12345-to-12345javasc/</guid>
		<description><![CDATA[format &#8216;12345&#8242; to &#8216;12,345&#8242;
javascript:
string.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, function(s){return s+","})

ruby:
string.gsub(/(\d)(?=(\d\d\d)+(?!\d))/) { &#124;match&#124; match + ',' }

DecimalFormat class also can be used.]]></description>
			<content:encoded><![CDATA[<p>format &#8216;12345&#8242; to &#8216;12,345&#8242;</p>
<p>javascript:<br />
<code>string.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, function(s){return s+","})<br />
</code></p>
<p>ruby:<br />
<code>string.gsub(/(\d)(?=(\d\d\d)+(?!\d))/) { |match| match + ',' }<br />
</code></p>
<p>DecimalFormat class also can be used.</p>]]></content:encoded>
			<wfw:commentRss>http://doing.liduan.com/2009/07/01/format-12345-to-12345javasc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
