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.
   
![image](https://user-images.githubusercontent.com/28550438/213464600-0f5799de-85ae-43fc-b29c-b1ec94fa9d41.png)
   
   The actual content is as follows: the XML document structure is broken by <.
   
![image](https://user-images.githubusercontent.com/28550438/213464627-d9046b99-5fef-49c9-8e59-9c8304db4dfa.png)
   
   When escaped, it is normal.
   &lt;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">&lt;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]

Reply via email to