<?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/"
		>
<channel>
	<title>Comments on: Cleaning up HTML</title>
	<atom:link href="http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/</link>
	<description>WordPress, web development, and world domination.</description>
	<lastBuildDate>Sat, 11 Feb 2012 20:29:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: dusoft</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-516</link>
		<dc:creator>dusoft</dc:creator>
		<pubDate>Fri, 16 Apr 2004 14:20:32 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-516</guid>
		<description>Check out &lt;a href=&quot;http://www.absolutengine.com&quot; title=&quot;Content management system Absolut Engine - produces valid XHTML, WYSIWYG editor, clean URLS&lt; SEO built-in&quot;&gt;Content management system Absolut Engine&lt;/a&gt;
It produces valid XHTML Strict from WYSIWYG editor!</description>
		<content:encoded><![CDATA[<p>Check out <a href="http://www.absolutengine.com" title="Content management system Absolut Engine - produces valid XHTML, WYSIWYG editor, clean URLS< SEO built-in">Content management system Absolut Engine</a><br />
It produces valid <acronym title='eXtensible HyperText Markup Language'><span class='caps'>XHTML</span></acronym> Strict from <acronym title='What You See Is What You Get'><span class='caps'>WYSIWYG</span></acronym> editor!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-104</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Mon, 10 Mar 2003 14:19:04 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-104</guid>
		<description>&lt;p&gt;I already use the strip_tags() function (with the optional array of allowed tags). But it doesn&#039;t do anything to help close unbalanced tags, or to strip out attempts to insert javascript urls (unless you disallow links altogether).
&lt;/p&gt;
&lt;p&gt;
I&#039;m still mulling the problem over. Another solution might be to use something like &lt;a href=&quot;http://www.phpbb.com/guide/phpBB_Users_Guide.html#section4_2_5&quot;&gt;BBCode&lt;/a&gt;, or a &lt;a href=&quot;http://www.intertwingly.net/blog/1251.html&quot;&gt;Wiki-like syntax&lt;/a&gt;.
&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I already use the strip_tags() function (with the optional array of allowed tags). But it doesn&#8217;t do anything to help close unbalanced tags, or to strip out attempts to insert javascript urls (unless you disallow links altogether).
</p>
<p>
I&#8217;m still mulling the problem over. Another solution might be to use something like <a href="http://www.phpbb.com/guide/phpBB_Users_Guide.html#section4_2_5">BBCode</a>, or a <a href="http://www.intertwingly.net/blog/1251.html">Wiki-like syntax</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean "XariusX" Maddison</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-103</link>
		<dc:creator>Sean "XariusX" Maddison</dc:creator>
		<pubDate>Mon, 10 Mar 2003 13:22:26 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-103</guid>
		<description>Try this:

$foo = strip_tags($foo)

then

$foo = nl2br($foo)

This will remove ALL HTML tags and format all newlines to &lt;br /&gt;

If thats what you are after anyway.</description>
		<content:encoded><![CDATA[<p>Try this:</p>
<p>$foo = strip_tags($foo)</p>
<p>then</p>
<p>$foo = nl2br($foo)</p>
<p>This will remove ALL <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> tags and format all newlines to </p>
<p>If thats what you are after anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-101</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Fri, 28 Feb 2003 18:50:15 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-101</guid>
		<description>&lt;p&gt;Yes, I had run across phpTidyHt earlier today. I&#039;m definitely going to take a look at it, though I still hope to find a solution that doesn&#039;t require a sytem call to an external program.
&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yes, I had run across phpTidyHt earlier today. I&#8217;m definitely going to take a look at it, though I still hope to find a solution that doesn&#8217;t require a sytem call to an external program.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-100</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 28 Feb 2003 18:37:04 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-100</guid>
		<description>&lt;a href=&quot;http://www.gemini1consulting.com/tekhelp/phptidyht/phptidyht_demo.php&quot;&gt;This&lt;/a&gt; looks like a working demo. I suspect they&#039;re just passing it through the command line, which is what I&#039;d recommend as the easiest solution as well.</description>
		<content:encoded><![CDATA[<p><a href="http://www.gemini1consulting.com/tekhelp/phptidyht/phptidyht_demo.php">This</a> looks like a working demo. I suspect they&#8217;re just passing it through the command line, which is what I&#8217;d recommend as the easiest solution as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-99</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Fri, 28 Feb 2003 11:50:08 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-99</guid>
		<description>&lt;p&gt;
I &lt;em&gt;thought&lt;/em&gt; I had heard something about a native way to call Tidy from PHP, and I did do a search at &lt;a href=&quot;http://php.net/&quot;&gt;php.net&lt;/a&gt;, but that came up empty. I just didn&#039;t have time to cast my net wider yet.
&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>
I <em>thought</em> I had heard something about a native way to call Tidy from <acronym title='Php Hypertext Processor'><span class='caps'>PHP</span></acronym>, and I did do a search at <a href="http://php.net/">php.net</a>, but that came up empty. I just didn&#8217;t have time to cast my net wider yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny</title>
		<link>http://dougal.gunters.org/blog/2003/02/27/cleaning-up-html/#comment-98</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Fri, 28 Feb 2003 09:14:40 +0000</pubDate>
		<guid isPermaLink="false">//?p=#comment-98</guid>
		<description>The &#039;standard&#039; tool for cleaning HTML (which can output XHTML) is HTML Tidy from the W3C (by Dave Raggett originally, I think) - I&#039;m pretty sure you&#039;ll find a PHP interface with a bit of googling. I use this both as a desktop app and (Java version) embedded in code, and its results really do seem magical at times.</description>
		<content:encoded><![CDATA[<p>The &#8216;standard&#8217; tool for cleaning <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> (which can output <acronym title='eXtensible HyperText Markup Language'><span class='caps'>XHTML</span></acronym>) is <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> Tidy from the <acronym title='World Wide Web Consortium'><span class='caps'>W3C</span></acronym> (by Dave Raggett originally, I think) &#8211; I&#8217;m pretty sure you&#8217;ll find a <acronym title='Php Hypertext Processor'><span class='caps'>PHP</span></acronym> interface with a bit of googling. I use this both as a desktop app and (Java version) embedded in code, and its results really do seem magical at times.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Served from: dougal.gunters.org @ 2012-02-12 01:13:18 by W3 Total Cache -->
