<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PHP Labware forum — Using htmLawed in WordPress 2]]></title>
		<link>https://www.bioinformatics.org/phplabware/forum/viewtopic.php?id=44</link>
		<atom:link href="https://www.bioinformatics.org/phplabware/forum/extern.php?action=feed&amp;tid=44&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Using htmLawed in WordPress 2.]]></description>
		<lastBuildDate>Wed, 23 Apr 2008 17:48:47 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Using htmLawed in WordPress 2]]></title>
			<link>https://www.bioinformatics.org/phplabware/forum/viewtopic.php?pid=132#p132</link>
			<description><![CDATA[<p>WordPress can be made to use htmLawed instead of Kses as htmLawed code is compatible with code calling the kses() function. Following steps are suggested (also see <a href="http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s2.6">htmLawed doc</a>):</p><p>1. Copy the htmLawed code to file wp_includes/kses.php,</p><p>2. Rename the newly added function kses to wp_kses, and delete the code for the original wp_kses function.</p><p>3. Enter following code in function kses_hook:</p><div class="codebox"><pre class="prettyprint"><code>$allowed_html = $spec;
$allowed_protocols = array();
foreach($cf[&#039;schemes&#039;] as $v){
 foreach($v as $k2=&gt;$v2){
  if(!in_array($k2, $allowed_protocols)){
   $allowed_protocols[] = $k2;
  }
 }
}
return wp_kses_hook($string, $allowed_html, $allowed_protocols);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (patnaik)]]></author>
			<pubDate>Wed, 23 Apr 2008 17:48:47 +0000</pubDate>
			<guid>https://www.bioinformatics.org/phplabware/forum/viewtopic.php?pid=132#p132</guid>
		</item>
	</channel>
</rss>
