<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: WP Quickie: kses</title>
	<atom:link href="http://ottopress.com/2010/wp-quickie-kses/feed/" rel="self" type="application/rss+xml" />
	<link>http://ottopress.com/2010/wp-quickie-kses/</link>
	<description>You have to use an Ottopress to get fresh squeezed Otto.</description>
	<lastBuildDate>Wed, 22 May 2013 16:53:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta3-24284</generator>
	<item>
		<title>By: FLATCLE News &#124; WP Quickie: kses » Otto on WordPress</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-11762</link>
		<dc:creator>FLATCLE News &#124; WP Quickie: kses » Otto on WordPress</dc:creator>
		<pubDate>Thu, 11 Apr 2013 18:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-11762</guid>
		<description><![CDATA[[...] via WP Quickie: kses » Otto on WordPress. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] via WP Quickie: kses » Otto on WordPress. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sven</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-11677</link>
		<dc:creator>Sven</dc:creator>
		<pubDate>Mon, 11 Mar 2013 20:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-11677</guid>
		<description><![CDATA[I usually edit WP core file &lt;i&gt;kses.php&lt;/i&gt; every time there is an update, to remove some allowed tags and add some extra.

How could I do that for example via &lt;i&gt;functions.php&lt;/i&gt;?]]></description>
		<content:encoded><![CDATA[<p>I usually edit WP core file <i>kses.php</i> every time there is an update, to remove some allowed tags and add some extra.</p>
<p>How could I do that for example via <i>functions.php</i>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-11557</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Fri, 18 Jan 2013 14:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-11557</guid>
		<description><![CDATA[For performance, it&#039;s best to use kses on the input before saving it to the database. WordPress does this via pre_* filters, such as pre_comment_content and similar. Thus, the &quot;safe&quot; content is what gets saved. Then it can just output it directly.]]></description>
		<content:encoded><![CDATA[<p>For performance, it&#8217;s best to use kses on the input before saving it to the database. WordPress does this via pre_* filters, such as pre_comment_content and similar. Thus, the &#8220;safe&#8221; content is what gets saved. Then it can just output it directly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-11556</link>
		<dc:creator>Javier</dc:creator>
		<pubDate>Fri, 18 Jan 2013 14:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-11556</guid>
		<description><![CDATA[Great stuff here! Kind of late, but thanks anyway...

Now, I heard from Mark Jaquith you are not suppose to use kses for ouptputing stuff (performance wise). So if I need to output some user input html, how do I do that? I mean, how do I make sure I&#039;m escaping right and letting that html pass through?]]></description>
		<content:encoded><![CDATA[<p>Great stuff here! Kind of late, but thanks anyway&#8230;</p>
<p>Now, I heard from Mark Jaquith you are not suppose to use kses for ouptputing stuff (performance wise). So if I need to output some user input html, how do I do that? I mean, how do I make sure I&#8217;m escaping right and letting that html pass through?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zord</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-11125</link>
		<dc:creator>Zord</dc:creator>
		<pubDate>Mon, 06 Aug 2012 15:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-11125</guid>
		<description><![CDATA[Of course right after posting here I realized there was a typo in the hook name... it&#039;s _ not -. Thanks anyway, works now :D]]></description>
		<content:encoded><![CDATA[<p>Of course right after posting here I realized there was a typo in the hook name&#8230; it&#8217;s _ not -. Thanks anyway, works now <img src='http://ottopress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zord</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-11124</link>
		<dc:creator>Zord</dc:creator>
		<pubDate>Mon, 06 Aug 2012 14:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-11124</guid>
		<description><![CDATA[Hi Otto,

I&#039;m trying to make a plugin for kses - basically I want to allow images, but I want to replace
[php]&lt;img src=&quot;x&quot; /&gt; with &lt;a href=&quot;x&quot;&gt;&lt;img src=&quot;x&quot; /&gt;&lt;/a&gt;&lt;/code&gt;[/php]

So here&#039;s where I am right now:
[php]
global $allowedtags;
$allowedtags[&#039;img&#039;] = array( &#039;src&#039; =&gt; array () );

//take images, and enclose them in a link
function zimgf($ztring){
$result = preg_replace(&#039;/&lt;img src=&quot;(.+)&quot;(.+)\/&gt;/Ui&#039;, &#039;&lt;a href=&quot;$1&quot;&gt;&lt;img src=&quot;$1&quot;$2/&gt;&lt;/a&gt;&#039;, $ztring);
return $result;
}

add_filter(&#039;pre-kses&#039;, &#039;zimgf&#039;);
[/php]

Problem is, while this does allow the images through, it doesn&#039;t do the replacing part (the regex works, tried it separately).]]></description>
		<content:encoded><![CDATA[<p>Hi Otto,</p>
<p>I&#8217;m trying to make a plugin for kses &#8211; basically I want to allow images, but I want to replace</p>
<pre class="brush: php; title: ; notranslate">&lt;img src=&quot;x&quot; /&gt; with &lt;a href=&quot;x&quot;&gt;&lt;img src=&quot;x&quot; /&gt;&lt;/a&gt;&lt;/code&gt;</pre>
<p>So here&#8217;s where I am right now:</p>
<pre class="brush: php; title: ; notranslate">
global $allowedtags;
$allowedtags['img'] = array( 'src' =&gt; array () );

//take images, and enclose them in a link
function zimgf($ztring){
$result = preg_replace('/&lt;img src=&quot;(.+)&quot;(.+)\/&gt;/Ui', '&lt;a href=&quot;$1&quot;&gt;&lt;img src=&quot;$1&quot;$2/&gt;&lt;/a&gt;', $ztring);
return $result;
}

add_filter('pre-kses', 'zimgf');
</pre>
<p>Problem is, while this does allow the images through, it doesn&#8217;t do the replacing part (the regex works, tried it separately).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-10915</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Wed, 06 Jun 2012 15:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-10915</guid>
		<description><![CDATA[If you don&#039;t want any HTML, just pass it through &lt;a href=&quot;http://php.net/manual/en/function.strip-tags.php&quot; rel=&quot;nofollow&quot;&gt;strip_tags&lt;/a&gt;.]]></description>
		<content:encoded><![CDATA[<p>If you don&#8217;t want any HTML, just pass it through <a href="http://php.net/manual/en/function.strip-tags.php" rel="nofollow">strip_tags</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kay</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-10914</link>
		<dc:creator>Kay</dc:creator>
		<pubDate>Wed, 06 Jun 2012 13:04:14 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-10914</guid>
		<description><![CDATA[Hi!
Would something like this be valid ?

wp_kses($unfiltered, &#039;&#039;) if i don&#039;t want any html tags allowed?]]></description>
		<content:encoded><![CDATA[<p>Hi!<br />
Would something like this be valid ?</p>
<p>wp_kses($unfiltered, &#8221;) if i don&#8217;t want any html tags allowed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-10237</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 06 Dec 2011 22:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-10237</guid>
		<description><![CDATA[Awesome post.  Thanks again Otto, you always save the day.]]></description>
		<content:encoded><![CDATA[<p>Awesome post.  Thanks again Otto, you always save the day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Content filteren met KSES of REGEX &#124; WPdevil &#8211; Devilish Development</title>
		<link>http://ottopress.com/2010/wp-quickie-kses/comment-page-1/#comment-10217</link>
		<dc:creator>Content filteren met KSES of REGEX &#124; WPdevil &#8211; Devilish Development</dc:creator>
		<pubDate>Fri, 02 Dec 2011 18:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=97#comment-10217</guid>
		<description><![CDATA[[...] KSES staat voor “kses strips evil scripts” en is een filter voor HTML. WordPress gebruikt het standaard om comments te filteren. Otto legt het verder heel goed uit in zijn post http://ottopress.com/2010/wp-quickie-kses/ [...]]]></description>
		<content:encoded><![CDATA[<p>[...] KSES staat voor “kses strips evil scripts” en is een filter voor HTML. WordPress gebruikt het standaard om comments te filteren. Otto legt het verder heel goed uit in zijn post <a href="http://ottopress.com/2010/wp-quickie-kses/" rel="nofollow">http://ottopress.com/2010/wp-quickie-kses/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 423/438 objects using xcache

 Served from: ottodestruct.com @ 2013-05-23 22:28:31 by W3 Total Cache -->