<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Single and double quote in Item Description]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5350</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5350&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Single and double quote in Item Description.]]></description>
		<lastBuildDate>Mon, 16 Feb 2015 10:05:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22569#p22569</link>
			<description><![CDATA[<p>This needs to be fixed in FA 2.3 itself so that there is no carry forward errors into FA 2.4.....</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 16 Feb 2015 10:05:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22569#p22569</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22567#p22567</link>
			<description><![CDATA[<p>I would rather wait that the new version of FA fixes it, otherwise, I would have to run a find/replace each time FA has a new version.<br />______________________<br />Are you interested in <a href="http://www.pass4sure.co.uk">pass4sure</a> Get our self paced <a href="http://www.pass4sure.co.uk/CompTIA-A-plus-training.html">a+ notes</a> itil study packages to pass your <a href="http://www.rasmussen.edu/">rasmussen</a> without any <a href="http://en.wikipedia.org/wiki/Hobe_Sound_Bible_College">Hobe Sound Bible College</a> lsat.</p>]]></description>
			<author><![CDATA[null@example.com (pyaramosam)]]></author>
			<pubDate>Mon, 16 Feb 2015 07:28:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22567#p22567</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21679#p21679</link>
			<description><![CDATA[<p>I hope our chief developer, Janusz, sees this.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 06 Dec 2014 11:43:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21679#p21679</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21676#p21676</link>
			<description><![CDATA[<p>That&#039;s right. Waiting for @joe to clarify way forward and integrate a fix.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 06 Dec 2014 09:22:56 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21676#p21676</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21672#p21672</link>
			<description><![CDATA[<p>whaoo, I would rather wait that the new version of FA fixes it, otherwise, I would have to run a find/replace each time FA has a new version.<br />I think i should mention that to Joe, so he can consider it for the next version, right ?<br />Tx</p>]]></description>
			<author><![CDATA[null@example.com (DavidMaurice)]]></author>
			<pubDate>Sat, 06 Dec 2014 06:26:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21672#p21672</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21671#p21671</link>
			<description><![CDATA[<p>A possible search and replace using the QUOTE() function of MySQL may be one solution. Another would be a search and replace of such known entities in the most affected fields or in the db_escape function itself. This is also the reason why the currency symbols stand as &quot;?&quot; in the CoA sqls.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 06 Dec 2014 06:16:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21671#p21671</guid>
		</item>
		<item>
			<title><![CDATA[Re: Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21669#p21669</link>
			<description><![CDATA[<p>Hi Apmuthu,<br />Tx for this post, which i understand, but what can we do then to fix this ?<br />One of my customer is named O&#039;brian, and it displays &quot;O&#039;Brian&quot;.<br />Tx</p>]]></description>
			<author><![CDATA[null@example.com (DavidMaurice)]]></author>
			<pubDate>Sat, 06 Dec 2014 06:04:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21669#p21669</guid>
		</item>
		<item>
			<title><![CDATA[Single and double quote in Item Description]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21593#p21593</link>
			<description><![CDATA[<p>Items like &quot;Pipe 15 ft long&quot; in the Item description displays fine. But if the abbreviation of feet as as an apostrophe / single quote is used, then it gets entered into the table as <strong>&amp;#039;</strong> instead. </p><p>Hence the Item: &quot;Pipe 15&#039; long&quot; now becomes &quot;Pipe 15&amp;#039; long&quot;</p><p>This is due to the way <strong>function db_escape()</strong> is programmed in <strong>includes/db/connect_db.inc</strong>.<br /></p><div class="codebox"><pre><code>function db_escape($value = &quot;&quot;, $nullify = false)
{
    $value = @html_entity_decode($value, ENT_QUOTES, $_SESSION[&#039;language&#039;]-&gt;encoding);
    $value = @htmlspecialchars($value, ENT_QUOTES, $_SESSION[&#039;language&#039;]-&gt;encoding);

      //reset default if second parameter is skipped
    $nullify = ($nullify === null) ? (false) : ($nullify);

      //check for null/unset/empty strings
    if ((!isset($value)) || (is_null($value)) || ($value === &quot;&quot;)) {
        $value = ($nullify) ? (&quot;NULL&quot;) : (&quot;&#039;&#039;&quot;);
    } else {
        if (is_string($value)) {
              //value is a string and should be quoted; determine best method based on available extensions
            if (function_exists(&#039;mysql_real_escape_string&#039;)) {
                  $value = &quot;&#039;&quot; . mysql_real_escape_string($value) . &quot;&#039;&quot;;
            } else {
              $value = &quot;&#039;&quot; . mysql_escape_string($value) . &quot;&#039;&quot;;
            }
        } else if (!is_numeric($value)) {
            //value is not a string nor numeric
            display_error(&quot;ERROR: incorrect data type send to sql query&quot;);
            echo &#039;&lt;br&gt;&lt;br&gt;&#039;;
            exit();
        }
    }
    return $value;
}</code></pre></div><p>MySQL now has an builtin <a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_quote"><strong>QUOTE()</strong> function</a> that can now dispense with quoting / cleaning up any string to be entered through SQL directly.</p><p>The use of <strong>htmlspecialchars()</strong> is dictated by certain PHP environment settings:<br /></p><div class="codebox"><pre><code>&#039; &quot; &#039; (double quote) becomes &#039;&amp;quot;&#039; when ENT_NOQUOTES is not set. 
&quot; &#039; &quot; (single quote) becomes &#039;&amp;#039;&#039; only when ENT_QUOTES is set. </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 28 Nov 2014 16:09:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21593#p21593</guid>
		</item>
	</channel>
</rss>
