Fixed off-by-one bug in remove_html_tags().
This commit is contained in:
parent
a3eb01ff2e
commit
15af9633bf
|
@ -118,6 +118,10 @@ const string URI::remove_html_tags(const string &html)
|
|||
size_t endpos = html.find('>', startpos);
|
||||
out += html.substr(pos, startpos - pos);
|
||||
pos = endpos;
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
++pos;
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
|
|
Loading…
Reference in New Issue
Block a user