<?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: Bug: apostrophe and character count</title>
	<atom:link href="http://thedeadone.net/forum/?feed=rss2&#038;p=5876" rel="self" type="application/rss+xml" />
	<link>http://thedeadone.net/forum/?p=5876</link>
	<description>Wordpress Powered Forums for thedeadone.net</description>
	<lastBuildDate>Wed, 08 Sep 2010 03:14:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Mark Cunningham</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-5188</link>
		<dc:creator>Mark Cunningham</dc:creator>
		<pubDate>Fri, 18 Sep 2009 08:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-5188</guid>
		<description>Good news. Only some minor mods were required for Magic Quotes off. I&#039;m going to be releasing a new version fairly soon with these changes.

&lt;pre&gt;
Magic Quotes: ON
================
Widget Screen    : OK
Form Hacker      : OK

[AJAX: On]         Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------          
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
Edit-Post-Submit : OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A

[AJAX: Off]        Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
Edit-Post-Submit : OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A

Magic Quotes: OFF
=================
Widget Screen    : OK
Form Hacker      : OK

[AJAX: On]         Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------          
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
Edit-Post-Submit : OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A

[AJAX: Off]        Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
Edit-Post-Submit : OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Good news. Only some minor mods were required for Magic Quotes off. I&#8217;m going to be releasing a new version fairly soon with these changes.</p>
<pre>
Magic Quotes: ON
================
Widget Screen    : OK
Form Hacker      : OK

[AJAX: On]         Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview: OK    | OK      | N/A     | N/A          | N/A
Edit-Post-Submit : OK    | OK      | N/A     | N/A          | N/A

[AJAX: Off]        Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview: OK    | OK      | N/A     | N/A          | N/A
Edit-Post-Submit : OK    | OK      | N/A     | N/A          | N/A

Magic Quotes: OFF
=================
Widget Screen    : OK
Form Hacker      : OK

[AJAX: On]         Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview: OK    | OK      | N/A     | N/A          | N/A
Edit-Post-Submit : OK    | OK      | N/A     | N/A          | N/A

[AJAX: Off]        Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview: OK    | OK      | N/A     | N/A          | N/A
Edit-Post-Submit : OK    | OK      | N/A     | N/A          | N/A
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Cunningham</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-5175</link>
		<dc:creator>Mark Cunningham</dc:creator>
		<pubDate>Wed, 16 Sep 2009 12:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-5175</guid>
		<description>I&#039;ve sorted out &quot;Magic Quotes On&quot; now. Everything seems to work, the character and word counts seem correct too. You can grab it right now from &lt;a href=&quot;http://downloads.wordpress.org/plugin/tdo-mini-forms.zip&quot; rel=&quot;external&quot; rel=&quot;nofollow&quot;&gt;the dev version on wordpress.org&lt;/a&gt;.

If you&#039;ve got Magic Quotes off, you&#039;re going to have to wait a bit longer, though this version should be pretty strong.

&lt;pre&gt;Wordpress 2.8.2
+++++++++++++++

Magic Quotes: ON
================
Widget Screen    : OK
Form Hacker      : OK

[AJAX: On]         Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------          
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
Edit-Post-Submit : OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A

[AJAX: Off]        Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A
Edit-Post-Submit : OK    &#124; OK      &#124; N/A     &#124; N/A          &#124; N/A

Magic Quotes: OFF
=================
Widget Screen    :
Form Hacker      :

[AJAX: On]         Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------          
New-Post-Preview : 
New-Post-Submit  : 
Edit-Post-Preview: 
Edit-Post-Submit :

[AJAX: Off]        Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : 
New-Post-Submit  :
Edit-Post-Preview: 
Edit-Post-Submit :&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve sorted out &#8220;Magic Quotes On&#8221; now. Everything seems to work, the character and word counts seem correct too. You can grab it right now from <a href="http://downloads.wordpress.org/plugin/tdo-mini-forms.zip" rel="external" rel="nofollow">the dev version on wordpress.org</a>.</p>
<p>If you&#8217;ve got Magic Quotes off, you&#8217;re going to have to wait a bit longer, though this version should be pretty strong.</p>
<pre>WordPress 2.8.2
+++++++++++++++

Magic Quotes: ON
================
Widget Screen    : OK
Form Hacker      : OK

[AJAX: On]         Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview: OK    | OK      | N/A     | N/A          | N/A
Edit-Post-Submit : OK    | OK      | N/A     | N/A          | N/A

[AJAX: Off]        Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview: OK    | OK      | N/A     | N/A          | N/A
Edit-Post-Submit : OK    | OK      | N/A     | N/A          | N/A

Magic Quotes: OFF
=================
Widget Screen    :
Form Hacker      :

[AJAX: On]         Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview :
New-Post-Submit  :
Edit-Post-Preview:
Edit-Post-Submit :

[AJAX: Off]        Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview :
New-Post-Submit  :
Edit-Post-Preview:
Edit-Post-Submit :</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Cunningham</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-5140</link>
		<dc:creator>Mark Cunningham</dc:creator>
		<pubDate>Thu, 10 Sep 2009 09:08:40 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-5140</guid>
		<description>&lt;blockquote&gt;&lt;cite&gt;Mark said:&lt;/cite&gt;
Sorry for opening this can of worms!&lt;/blockquote&gt;

Don&#039;t worry about it. It needs to be fixed. It&#039;s forced me to do some work that I&#039;ve been leaving aside so I&#039;m doing a bit of refactoring of the widget code. This will be better in the long run for new features too as well. 

My progress is slow so far because as I work on it I keep realising new cases to test to truly solve it. So far I&#039;ve made sure that for the normal form the basic textfields and textareas work correctly when Magic Quotes are ON. 

&lt;pre&gt;
Magic Quotes: ON
================
Widget Screen    :
Form Hacker      :

[AJAX: On]         Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------          
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview:
Edit-Post-Submit :

[AJAX: Off]        Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
New-Post-Submit  : OK    &#124; OK      &#124; OK      &#124; OK           &#124; OK
Edit-Post-Preview: 
Edit-Post-Submit :

Magic Quotes: OFF
=================
Widget Screen    :
Form Hacker      :

[AJAX: On]         Title &#124; Content &#124; Excerpt &#124; CF: TextArea &#124; CF: TextField
--------------------------------------------------------------------------          
New-Post-Preview : 
New-Post-Submit  : 
Edit-Post-Preview: 
Edit-Post-Submit :
&lt;/pre&gt;

Hopefully the work will progress a little faster now with the majority of the refactoring complete.</description>
		<content:encoded><![CDATA[<blockquote><p><cite>Mark said:</cite><br />
Sorry for opening this can of worms!</p></blockquote>
<p>Don&#8217;t worry about it. It needs to be fixed. It&#8217;s forced me to do some work that I&#8217;ve been leaving aside so I&#8217;m doing a bit of refactoring of the widget code. This will be better in the long run for new features too as well. </p>
<p>My progress is slow so far because as I work on it I keep realising new cases to test to truly solve it. So far I&#8217;ve made sure that for the normal form the basic textfields and textareas work correctly when Magic Quotes are ON. </p>
<pre>
Magic Quotes: ON
================
Widget Screen    :
Form Hacker      :

[AJAX: On]         Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview:
Edit-Post-Submit :

[AJAX: Off]        Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview : OK    | OK      | OK      | OK           | OK
New-Post-Submit  : OK    | OK      | OK      | OK           | OK
Edit-Post-Preview:
Edit-Post-Submit :

Magic Quotes: OFF
=================
Widget Screen    :
Form Hacker      :

[AJAX: On]         Title | Content | Excerpt | CF: TextArea | CF: TextField
--------------------------------------------------------------------------
New-Post-Preview :
New-Post-Submit  :
Edit-Post-Preview:
Edit-Post-Submit :
</pre>
<p>Hopefully the work will progress a little faster now with the majority of the refactoring complete.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-5088</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 03 Sep 2009 08:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-5088</guid>
		<description>Sorry for opening this can of worms!</description>
		<content:encoded><![CDATA[<p>Sorry for opening this can of worms!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Cunningham</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-5087</link>
		<dc:creator>Mark Cunningham</dc:creator>
		<pubDate>Thu, 03 Sep 2009 08:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-5087</guid>
		<description>I&#039;m doing my nut trying to fix this. 

I have it mostly working for AJAX and Magic Quotes enabled... but Wordpress *still* insists on unnecessarily adding slashes. Whats worse, it doesn&#039;t do it in a consistent manner. Passing the content through the &quot;the_content&quot; filter means it passes through wptexturize function. This does silly stuff like turn apostrophes into fancy apostrophes around words. It also adds back in extra slashes... but only around specific characters, not all characters that would have slashes given the magic quote setting. I can&#039;t just pass the content through stripslashes() because that will remove genuine backslashes in the content! 

This problem can be found, not just in the Content widget, but in the Excerpt and Custom Field widget (because they all use &quot;the_content&quot; filter in Wordpress). I will do my best to make an approximate fix for it, but it&#039;ll never be perfect. :(

And I haven&#039;t even tackled the other six other cases yet!</description>
		<content:encoded><![CDATA[<p>I&#8217;m doing my nut trying to fix this. </p>
<p>I have it mostly working for AJAX and Magic Quotes enabled&#8230; but WordPress *still* insists on unnecessarily adding slashes. Whats worse, it doesn&#8217;t do it in a consistent manner. Passing the content through the &#8220;the_content&#8221; filter means it passes through wptexturize function. This does silly stuff like turn apostrophes into fancy apostrophes around words. It also adds back in extra slashes&#8230; but only around specific characters, not all characters that would have slashes given the magic quote setting. I can&#8217;t just pass the content through stripslashes() because that will remove genuine backslashes in the content! </p>
<p>This problem can be found, not just in the Content widget, but in the Excerpt and Custom Field widget (because they all use &#8220;the_content&#8221; filter in WordPress). I will do my best to make an approximate fix for it, but it&#8217;ll never be perfect. <img src='http://thedeadone.net/forum/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>And I haven&#8217;t even tackled the other six other cases yet!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Cunningham</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-4989</link>
		<dc:creator>Mark Cunningham</dc:creator>
		<pubDate>Fri, 28 Aug 2009 13:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-4989</guid>
		<description>So I did some tests, the situation doesn&#039;t look great. I basically tested with the Content widget and title option enabled. Oddly title and content would sometimes act differently.

Worst combination of options: magic quotes enabled and using AJAX. Preview on Content seems to be failing all the time now, that certainly wasn&#039;t the case with older versions of Wordpress.

&lt;pre&gt;
Wordpress 2.8.2
+++++++++++++++

Magic Quotes: ON
================
                  Title &#124; Content
AJAX: On
--------          
New-Post-Preview: FAIL  &#124; FAIL
New-Post-Submit : FAIL  &#124; FAIL   

AJAX: Off
---------
New-Post-Preview: OK    &#124; FAIL
New-Post-Submit : OK    &#124; OK

Magic Quotes: OFF
=================

AJAX: On
--------
New-Post-Preview: OK    &#124; FAIL
New-Post-Submit : OK    &#124; OK

AJAX: Off
---------
New-Post-Preview: OK    &#124; FAIL
New-Post-Submit : OK    &#124; OK
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>So I did some tests, the situation doesn&#8217;t look great. I basically tested with the Content widget and title option enabled. Oddly title and content would sometimes act differently.</p>
<p>Worst combination of options: magic quotes enabled and using AJAX. Preview on Content seems to be failing all the time now, that certainly wasn&#8217;t the case with older versions of WordPress.</p>
<pre>
Wordpress 2.8.2
+++++++++++++++

Magic Quotes: ON
================
                  Title | Content
AJAX: On
--------
New-Post-Preview: FAIL  | FAIL
New-Post-Submit : FAIL  | FAIL   

AJAX: Off
---------
New-Post-Preview: OK    | FAIL
New-Post-Submit : OK    | OK

Magic Quotes: OFF
=================

AJAX: On
--------
New-Post-Preview: OK    | FAIL
New-Post-Submit : OK    | OK

AJAX: Off
---------
New-Post-Preview: OK    | FAIL
New-Post-Submit : OK    | OK
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Cunningham</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-4988</link>
		<dc:creator>Mark Cunningham</dc:creator>
		<pubDate>Fri, 28 Aug 2009 12:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-4988</guid>
		<description>Ah the dreaded backslashes! I can never truly conquer them. I thought I had gotten close but it seems that the latest update to Wordpress has reversed some of that work on me. 

PHP has a option called &quot;magic quotes&quot;, that when you submit something online such as a form, it adds a blackslash to all apostrophes. I can&#039;t remember the reason. So then, in the backend, you may need to strip them before you process. You may need them before you add the data to a database, otherwise they break you&#039;re SQL query. Wordpress also does some &quot;prevention&quot; on this and I&#039;m never sure where and when it does it between versions. It always works within Wordpress, but I&#039;m always playing catchup.

And then there is AJAX.

I&#039;ll have a look into it and fix it for the next release, hopefully.</description>
		<content:encoded><![CDATA[<p>Ah the dreaded backslashes! I can never truly conquer them. I thought I had gotten close but it seems that the latest update to WordPress has reversed some of that work on me. </p>
<p>PHP has a option called &#8220;magic quotes&#8221;, that when you submit something online such as a form, it adds a blackslash to all apostrophes. I can&#8217;t remember the reason. So then, in the backend, you may need to strip them before you process. You may need them before you add the data to a database, otherwise they break you&#8217;re SQL query. WordPress also does some &#8220;prevention&#8221; on this and I&#8217;m never sure where and when it does it between versions. It always works within WordPress, but I&#8217;m always playing catchup.</p>
<p>And then there is AJAX.</p>
<p>I&#8217;ll have a look into it and fix it for the next release, hopefully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://thedeadone.net/forum/?p=5876#comment-4984</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 28 Aug 2009 09:54:38 +0000</pubDate>
		<guid isPermaLink="false">http://thedeadone.net/forum/?p=5876#comment-4984</guid>
		<description>Oh dear, the backslashes appear in the finished article too.

Another bug in this forum: in the post above my name is a link, but clicking on it yields:

  Alert
  The URL is not valid and cannot be loaded.</description>
		<content:encoded><![CDATA[<p>Oh dear, the backslashes appear in the finished article too.</p>
<p>Another bug in this forum: in the post above my name is a link, but clicking on it yields:</p>
<p>  Alert<br />
  The URL is not valid and cannot be loaded.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
