forked from Mirrors/privacore-open-source-search-engine
Make sure we process all robots meta tags (if there are multiple)
This commit is contained in:
10
XmlDoc.cpp
10
XmlDoc.cpp
@ -16602,12 +16602,18 @@ bool *XmlDoc::parseRobotsMetaTag() {
|
||||
const char *content = nullptr;
|
||||
int32_t contentLen = 0;
|
||||
|
||||
if (xml->getTagValue("name", "robots", "content", &content, &contentLen, true, TAG_META)) {
|
||||
int32_t startNode = 0;
|
||||
while (startNode < xml->getNumNodes() &&
|
||||
xml->getTagValue("name", "robots", "content", &content, &contentLen, true, TAG_META, &startNode)) {
|
||||
parseRobotsMetaTagContent(content, contentLen);
|
||||
++startNode;
|
||||
}
|
||||
|
||||
if (xml->getTagValue("name", g_conf.m_spiderBotName, "content", &content, &contentLen, true, TAG_META)) {
|
||||
startNode = 0;
|
||||
while (startNode < xml->getNumNodes() &&
|
||||
xml->getTagValue("name", g_conf.m_spiderBotName, "content", &content, &contentLen, true, TAG_META, &startNode)) {
|
||||
parseRobotsMetaTagContent(content, contentLen);
|
||||
++startNode;
|
||||
}
|
||||
|
||||
m_parsedRobotsMetaTag = true;
|
||||
|
Reference in New Issue
Block a user