<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tags/Jstree on Emad Alashi</title>
    <link>https://emadashi.com/tags/jstree/</link>
    <description>Recent content in Tags/Jstree on Emad Alashi</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 15 Jun 2010 14:42:23 +0000</lastBuildDate>
    <atom:link href="https://emadashi.com/tags/jstree/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Happy Life with Intuitive API in Smart Controls</title>
      <link>https://emadashi.com/2010/06/happy-life-with-intuitive-api-in-smart-controls/</link>
      <pubDate>Tue, 15 Jun 2010 14:42:23 +0000</pubDate>
      <guid>https://emadashi.com/2010/06/happy-life-with-intuitive-api-in-smart-controls/</guid>
      <description>&lt;p&gt;In this post I will show you an example of how smartly built controls and API’s can make the developers programming life extremely enjoyable, hopefully this example will urge you in giving such a smart effort when you build your own control or API.&lt;/p&gt;
&lt;p&gt;Lately I have been playing around with a very nice tree control based on jQuery called &lt;a href=&#34;http://www.jstree.com/&#34;&gt;jsTree&lt;/a&gt;. One of the nice features is that it allows populating the tree through asynchronous calls with JSON data representation. In order to achieve that, you needed to provide the data by JSON special format suitable to the tree. This format, regrettably, is open to the JSON vulnerability &lt;a href=&#34;http://haacked.com/&#34;&gt;Phil Haack&lt;/a&gt; talked about in his two posts &lt;a href=&#34;http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;http://haacked.com/archive/2009/06/25/json-hijacking.aspx&#34;&gt;here&lt;/a&gt;.&lt;br&gt;
So to avoid this vulnerability I had to change this default data format of the tree, at least until the very end of the data flow just before the tree populates the data, only then I can change it back to the default format, like the following:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
