Loading src/html.cpp +50 −0 Original line number Diff line number Diff line Loading @@ -1763,6 +1763,56 @@ void libhtmlpp::print(const Element &element, HtmlString &output,bool formated) goto PRINTNEXTEL; } }break; case TextAreaEL:{ output.append("<"); output.append(static_cast<const TextArea*>(el)->getTagname()); for (TextArea::Attributes* curattr = static_cast<const TextArea*>(el)->_firstAttr.get(); curattr; curattr = curattr->_nextAttr.get()) { output.append(" "); std::copy( curattr->_Key.begin(), curattr->_Key.end(), std::back_inserter(output) ); if(!curattr->_Value.empty()){ output.append("=\""); std::copy( curattr->_Value.begin(), curattr->_Value.end(), std::back_inserter(output) ); output.append("\""); } } output.append(">"); if(formated){ output.append("\r\n"); for(int i=0; i<lvl+1; ++i){ output.append(" "); } } std::copy( static_cast<const TextArea*>(el)->_Text.begin(), static_cast<const TextArea*>(el)->_Text.end(), std::back_inserter(output) ); if(formated){ output.append("\r\n"); for(int i=0; i<lvl; ++i){ output.append(" "); } } output.append("</"); output.append(static_cast<const TextArea*>(el)->getTagname()); output.append(">"); if(formated) output.append("\r\n"); if (el->_nextElement) { el=el->_nextElement.get(); goto PRINTNEXTEL; } }break; default: HTMLException excp; excp[HTMLException::Error] << "Unkown Elementtype"; Loading Loading
src/html.cpp +50 −0 Original line number Diff line number Diff line Loading @@ -1763,6 +1763,56 @@ void libhtmlpp::print(const Element &element, HtmlString &output,bool formated) goto PRINTNEXTEL; } }break; case TextAreaEL:{ output.append("<"); output.append(static_cast<const TextArea*>(el)->getTagname()); for (TextArea::Attributes* curattr = static_cast<const TextArea*>(el)->_firstAttr.get(); curattr; curattr = curattr->_nextAttr.get()) { output.append(" "); std::copy( curattr->_Key.begin(), curattr->_Key.end(), std::back_inserter(output) ); if(!curattr->_Value.empty()){ output.append("=\""); std::copy( curattr->_Value.begin(), curattr->_Value.end(), std::back_inserter(output) ); output.append("\""); } } output.append(">"); if(formated){ output.append("\r\n"); for(int i=0; i<lvl+1; ++i){ output.append(" "); } } std::copy( static_cast<const TextArea*>(el)->_Text.begin(), static_cast<const TextArea*>(el)->_Text.end(), std::back_inserter(output) ); if(formated){ output.append("\r\n"); for(int i=0; i<lvl; ++i){ output.append(" "); } } output.append("</"); output.append(static_cast<const TextArea*>(el)->getTagname()); output.append(">"); if(formated) output.append("\r\n"); if (el->_nextElement) { el=el->_nextElement.get(); goto PRINTNEXTEL; } }break; default: HTMLException excp; excp[HTMLException::Error] << "Unkown Elementtype"; Loading