- Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
Description
SW details (please complete the following information):
- IDE version: [IntelliJ IDEA 2021.2.1 (Community Edition)
Build #IC-212.5080.55, built on August 24, 2021] - Plug-in Version 2.0.0 - 2.4.0
Summary and background of the bug
Having a string like the following in POEditor:
<![CDATA[ <br /> <p><a href="mailto:xyz@abc.com">ABC Email</a></p> ]]> Makes the plugin to crash and never download the strings.
Steps to reproduce
Steps to reproduce the behaviour:
- Create a string with the above string in your POEditor project
- Try to sycn the string
- See error
> org.xml.sax.SAXParseException; lineNumber: 147; columnNumber: 235; The element type "p" must be terminated by the matching end-tag "</p>". I followed the exception and found that
String.unescapeHtmlTags() doesn't do its job of replaces all html tags, mostly it will fail to replace
**<a href="mailto:xyz@abc.com">**ABC Email</a>
so I used this piece of code to fix the issue locally instead of changing the regex used:
fun String.unescapeHtmlTags(): String { return this.replace("<", "<").replace(">", ">") } and it's working very well now.