Commit fda9b023 authored by jan.koester's avatar jan.koester
Browse files

copy repaired

parent 84f56b7d
Loading
Loading
Loading
Loading
+1 −25
Original line number Diff line number Diff line
@@ -887,31 +887,7 @@ NEWEL:
                else
                    ((libhtmlpp::ScriptElement*)dest)->setAttribute(cattr->_Key.data(),cattr->_Key.size(),nullptr,0);
            }

            if(((libhtmlpp::ScriptElement*)src)->_childElement){
                switch(((libhtmlpp::ScriptElement*)src)->_childElement->getType()){
                    case HtmlEl:
                        ((libhtmlpp::ScriptElement*)dest)->_childElement= new HtmlElement;
                        break;
                    case TextEl:
                        ((libhtmlpp::ScriptElement*)dest)->_childElement = new TextElement;
                        break;
                    case CommentEl:
                        ((libhtmlpp::ScriptElement*)dest)->_childElement = new CommentElement;
                        break;
                    case ScriptEL:
                        ((libhtmlpp::ScriptElement*)dest)->_childElement = new ScriptElement;
                        break;
                    default:
                        HTMLException ex;
                        ex[HTMLException::Critical] << "_copy: Unknown html element found !";
                        throw ex;
                }
                cpyel childel;
                childel.destin=((libhtmlpp::ScriptElement*)dest)->_childElement;
                childel.source=((libhtmlpp::ScriptElement*)src)->_childElement;
                cpylist.push(childel);
            }
            ((ScriptElement*)dest)->_Script=(((ScriptElement*)src)->_Script);
        }else if(src->getType()==libhtmlpp::TextEl && dest->getType()== libhtmlpp::TextEl){
            ((TextElement*)dest)->_Text=(((TextElement*)src)->_Text);
        }else if(src->getType()==libhtmlpp::CommentEl && dest->getType()== libhtmlpp::CommentEl){