pdf fix links

This commit is contained in:
Kulikova Svetlana
2021-10-29 14:21:21 +03:00
parent 0bee7b0aaa
commit fc7d427407
3 changed files with 46 additions and 17 deletions

View File

@ -652,7 +652,11 @@ return 0;
if (!sLink)
continue;
std::string link(sLink->getCString(), sLink->getLength());
size_t find = link.find("http");
size_t find = link.find("http://");
if (find == std::string::npos)
find = link.find("https://");
if (find == std::string::npos)
find = link.find("www.");
if (find != std::string::npos)
{
link.erase(0, find);