<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: The table is empty when the data contains single quote</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>mascott on The table is empty when the data contains single quote</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote#p22802</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote#p22802</guid>
        	        	<description><![CDATA[<p>I&#39;ve got any single or double quotes in my data without any problems with the view.</p>
<p>Check if Json is&#160;valid.</p>
]]></description>
        	        	<pubDate>Sat, 16 Apr 2011 14:30:33 +0300</pubDate>
        </item>
        <item>
        	<title>machetico on The table is empty when the data contains single quote</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote#p22773</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote#p22773</guid>
        	        	<description><![CDATA[<p>Have you found a solution? I am facing the same problem</p>
]]></description>
        	        	<pubDate>Thu, 14 Apr 2011 02:03:17 +0300</pubDate>
        </item>
        <item>
        	<title>flowerfires on The table is empty when the data contains single quote</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote#p21289</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/the-table-is-empty-when-the-data-contains-single-quote#p21289</guid>
        	        	<description><![CDATA[<p>Sorry my English is not good.&#160; Maybe somebody else had the same problem before, but I cannot find it in this forum as my reading speed is as slow as a snail.</p>
</p>
<p>Recently, I use jqgrid in my project. The jqgrid version is&#160; 3.8.1, and the jquery version is 1.4.4ã€‚I use Json to format the dataï¼Œand i use Ajax to load the data. The browsers I used are firefox 3.6.13 and IE8.</p>
</p>
<p>The problem is, normally, the jqgrid shows a great performance. Everything works fine. The data shows like this:</p>
<p><strong>Index&#160; name memo</strong></p>
<p>1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lily&#160;&#160;&#160;&#160;&#160;&#160; test</p>
<p>2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lily2&#160;&#160;&#160;&#160; test2</p>
</p>
<p>But, if I add a single quote to lily&#39;s memo,&#160; the grid shows like this:</p>
<p><strong>Index&#160; name memo</strong></p>
</p>
<p><strong>In other words, no data can be seen as long as it contains single quote , only the table head left.</strong></p>
</p>
<p>I tried to process json special charactors before put the data to jqgrid like this:</p>
</p>
<p>public static String jsonSpecialCharacters(String s) {<br />&#160;&#160; &#160;&#160;&#160; &#160;if (s == null &#124;&#124; s.length() &#60;= 0) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return "";<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;String value = s.replaceAll("\", "\\\");<br />&#160;&#160; &#160;&#160;&#160;&#160; value = value.replaceAll("\&#39;", "\\&#39;");<br />&#160;&#160; &#160;&#160;&#160;&#160; value = value.replaceAll(""", "\"");<br />&#160;&#160; &#160;&#160;&#160; &#160;return value;</p>
<p>}</p>
</p>
<p>It doesn&#39;t works.</p>
<p>It is not a good idea that to simply discard single quotes.&#160;</p>
<p>So, how to deal with it? What can I do to show the single quotes in my grid ? Or is there anything I should do but I have ingored in my project?</p>
</p>
<p>Thanks a lot!</p>
<p>&#160;<strong> </strong></p>
]]></description>
        	        	<pubDate>Wed, 15 Dec 2010 09:32:47 +0200</pubDate>
        </item>
</channel>
</rss>