title: Using CDATA inside another CDATA
body: <p>I have this difficult situation where I need to use the CDATA tags inside another CDATA tags. The situation is simple to explain though.</p>
  
  <p>I have the following thing:</p>
  
  <pre><code>&lt;edit&gt;
  &lt;![CDATA[
  &lt;script type="text/javascript"&gt;
  &lt;![CDATA[
      window.onload = function() 
      {
          document.getElementById('block').onclick = function() 
          {
              this.onclick = '';
              this.value = '{LA_SEND_CONFIRM}';
              this.className = this.className.replace('button1','');
              document.getElementById('replacement').value = '{LA_BLOCK_CODE}';
          }
      }
  ]]&gt;
  &lt;/script&gt;
  ]]&gt;
  &lt;/edit&gt;
  </code></pre>
  
  <p>I need to wrap my Javascript inside CDATA too for showing purposes, so when I open that XML file, it shows up properly and the Javascript code is inside those CDATA tags. They have no real meaning inside the XML file itself.</p>
  
  <p>As you already know, the code above would give me an XML parsing error, as nesting CDATA wouldn't work. Is there a way to escape the <code>]]&gt;</code> so I can show those brackets to my users?</p>
  
  <p>I hope I was clear enough.</p>