echarts-bot[bot] commented on issue #18192: URL: https://github.com/apache/echarts/issues/18192#issuecomment-1397046866
@minren118 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗 <details><summary><b>TRANSLATED</b></summary><br> **TITLE** [Bug] When using the getDataURL method to get svg text, when there are < symbols, it is not escaped and destroys the xml document structure **BODY** ### Version 5.3 ### Link to Minimal Reproduction _No response_ ### Steps to Reproduce When using getDataURL to output the svg text of the chart, it is found that ECharts does not escape and re-output special symbols such as <, resulting in an error in the exported svg text. When the browser opens, it will show such a logo, and the actual content cannot be rendered.  The actual content is as follows: the XML document structure is broken by <.  When escaped, it is normal. <text dominant-baseline="central" text-anchor="start" style="font: normal normal 14px Microsoft YaHei" x="30" y="7.5" transform="translate(85 520)" fill="#333"><5</text> ### Current Behavior The exported string is not escaped. ### Expected Behavior If you need to include special characters in the exported string, escape it before output. ### Environment ```markdown - OS: - Browser: - Framework: ``` ### Any additional comments? _No response_ </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
