Escaping apostrophes within html tags in Android XML exports
Describe the bug
When exporting translations in Android .xml format, special characters such as apostrophes (') are automatically escaped (works as expected). However, in strings containing html tags (such as <b></b>), the apostrophes are not escaped.
Example
<string name="hydration_description">
<b>L'hydratation</b>
est le pourcentage de volume de boissons comptabilisé dans l\'objectif.
</string>
The apostrophe in L'hydratation is not escaped because it's within the <b></b> tags.
Expected behavior The apostrophe within tags should be escaped.
Hi! Thanks for the report! Sorry for the delay.
I was able to reproduce the issue. Interestingly, Android Studio doesn't mark it as an error. It only fails when you try to compile the project.
Looking at the code, I see it was implemented this way from the start. Since Tolgee added support for escaping Android strings, all apostrophes not directly under the root node (
This issue is stale because it has been open for 30 days with no activity.