Commit 1b8c5a17 authored by jan.koester's avatar jan.koester
Browse files

all bugs fixed

parent f87ce723
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -407,11 +407,11 @@ libhtmlpp::Element *libhtmlpp::HtmlString::_buildTree() {
            }else if(strncmp(_Data.data()+ii,"<script",7)==0){
                size_t start=ii;

                ii+=7;

                while(ii<_Data.size()){
                    if(_Data[ii]==HTMLTAG_CLOSE) {

                        ++ii;

                        addelement(&firstEl,&lastEl,new ScriptElement());
                        std::vector<char> tel;

@@ -431,7 +431,7 @@ libhtmlpp::Element *libhtmlpp::HtmlString::_buildTree() {

                        std::copy(_Data.begin()+close,_Data.begin()+ii,
                                  std::back_inserter(((ScriptElement*)lastEl->element)->_Script));
                        ii+=7;
                        ii+=8;
                        break;
                    }
                    ++ii;
@@ -1005,11 +1005,11 @@ void libhtmlpp::Element::insertAfter(libhtmlpp::Element* el){
            break;
        }
        case CommentEl:{
            _nextElement=new CommentElement;;
            _nextElement=new CommentElement;
            break;
        }
        case ScriptEL:{
            _nextElement=new ScriptElement;;
            _nextElement=new ScriptElement;
            break;
        }
    }
@@ -1206,7 +1206,7 @@ const char * libhtmlpp::ScriptElement::getScript(){
}

int libhtmlpp::ScriptElement::getType() const{
    return ScriptEL;
    return ElementType::ScriptEL;
}

libhtmlpp::HtmlPage::HtmlPage(){
@@ -1465,6 +1465,11 @@ void libhtmlpp::print(Element* el, HtmlString &output,bool formated) {
            output.append(">");
            if(formated)
                output.append("\r\n");

            if (el->_nextElement) {
                el=el->_nextElement;
                goto PRINTNEXTEL;
            }
          }break;
        default:
            HTMLException excp;