Browse Source

Fix <style> and <script> erasure.

I didn't take into account that <script […]/> is possible.
main
tastytea 6 months ago
parent
commit
a49c500d0f
Signed by: tastytea GPG Key ID: CFC39497F1B26E07
  1. 5
      src/search.cpp

5
src/search.cpp

@ -165,7 +165,10 @@ void cleanup_text(string &text)
else if (text.substr(pos, 7) == "<style "
|| text.substr(pos, 8) == "<script ")
{
pos = text.find('>', pos) + 1;
if (text.find("/>", pos) > endpos)
{
endpos = text.find('>', endpos) + 1;
}
}
DEBUGLOG << "Replacing '" << text.substr(pos, endpos - pos)

Loading…
Cancel
Save