Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single quotes in xml are printed as ' #28

Closed
sjudd opened this issue Dec 31, 2017 · 2 comments
Closed

Single quotes in xml are printed as ' #28

sjudd opened this issue Dec 31, 2017 · 2 comments

Comments

@sjudd
Copy link
Contributor

sjudd commented Dec 31, 2017

I should have filed tomasbjerre/violations-gradle-plugin#4 here since it looks like the issue is in the library not the plugin, here's a copy/paste of the original issue:

╠════════════╪═════════════════════════════════════════════════════════════════╪══════════╪══════╪═════════════════════════════════════════════════════════════════════╣
  ║ Checkstyle │ com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck │ ERROR    │ 6    │ Wrong order for 'android.content.ContentResolver' import. ║
  ╚════════════╧═════════════════════════════════════════════════════════════════╧══════════╧══════╧═════════════════════════════════════════════════════════════════════╝

It's probably possible to render them as expected, if nothing else by just replacing the few special characters xml seems to allow: http://xml.silmaril.ie/specials.html.

@sjudd
Copy link
Contributor Author

sjudd commented Dec 31, 2017

I looked in to guava and it has only escapers, not unescapers so it doesn't seem like it will resolve this. The apache commons library looks like it has unescapers, though a bunch of them are deprecated.

It looks like it's actually pretty easy to just write an unescaper myself, so that's the approach I've taken for now. If you'd rather depend on apache commons or think it's worth spending more time looking for some common library to depend on, I'm happy to do so as well.

PR will be up shortly.

sjudd added a commit to sjudd/violations-lib that referenced this issue Dec 31, 2017
sjudd added a commit to sjudd/violations-lib that referenced this issue Dec 31, 2017
@tomasbjerre
Copy link
Owner

This is released now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants