Hello :)
If i do this test:
But when i get the exact same string from the XML file the console shows: This is a test string. completely stripping the <a href=""></a> parts.
regards
If i do this test:
print("RAW: This is an <a href=\"https://www.thesite.com/\">test</a> string.")The string: This is a <a href="https://www.thesite.com/">test</a> string. is printed to the console exactly as is typed above.
But when i get the exact same string from the XML file the console shows: This is a test string. completely stripping the <a href=""></a> parts.
soup = BeautifulSoup(projects.text, 'xml') xml_content_body = soup.find('taskBody') print("XML: " + xml_content_body.text) <- prints [b]This is a test string.[/b] to the console print("RAW: This is an <a href=\"https://www.thesite.com/\">test</a> string.") <- prints [b]This is a <a href="https://www.thesite.com/">test</a> string.[/b] to the consoleThe RAW one is the one i need, but when i get the exact same line of text from the XML the html ahref tag is stripped, i read get_text() does strip all html tags and text also seems to strip it, i will keep debugging the issue :)
regards