invalid_characters = re.compile('[^\u0009\u000A\u0020-\uD7FF\uE000-\uFFFD]') xml_data_cleaned = invalid_characters.sub('', xml_data.decode()).encode()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter