﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
7927	bbcode and js event problem	zleaf		"for example:
after paste a image in ckeditor in bbcode mode, (the image is like :

<img src=""http://cksource.com/forums/images/smilies/icon_e_biggrin.gif"" onclick=""alert('abc')"">

), then click the View Source button, error occur...

here's my way to fix this problem, hoping the official way [[BR]]
  
{{{
      function purge(d){
         var a=d.attributes,i,l,n;
         if(a){
            l=a.length;
            for(i=0;i<l;i+=1){
               n=a[i].name;
               if(typeof d[n]==='function'){
                  d[n]=null;
               }
            }
         }
         a=d.childNodes;
         if(a){
            l=a.length;
            for(i=0;i<l;i+=1){
               purge(d.childNodes[i]);
            }
         }
      }
      editor.on( 'insertHtml', function(data){
         var t=document.createElement('div');
         document.body.appendChild(t);
         t.innerHTML = data.data;
         purge(t);
         data.data = t.innerHTML;
         document.body.removeChild(t);
      });
}}}"	Bug	closed	Normal		General	3.6	fixed		
