212 std::vector<tags> tagStack;
215 res.reserve( text.size() );
216 std::string::size_type pos = 0;
226 res.push_back( text[pos] );
229 if ( text[pos] ==
' ' )
230 res.push_back(
' ' );
234 if ( pos+1 == text.npos )
236 WAR <<
"ended with nonclosed tag."<< endl;
239 if ( text[pos+1] ==
'/' )
241 pos = text.find(
'>', pos );
246 std::string::size_type tagEndPos = text.find(
'>', pos );
247 if ( tagEndPos == text.npos )
249 WAR <<
"ended with non-closed tag " << endl;
252 std::string tagname( text.substr( pos+1, tagEndPos-pos-1 ) );
254 res.append(
openTag( tagStack, tagname ) );
259 std::string::size_type semipos = text.find(
';', pos );
261 DBG <<
"tmp is: " << tmp << endl;
267 res.push_back( text[pos] );
271 }
while ( pos != text.size() );