Skip to content

XML.toString - Escape nightmare #285

Description

@eduveks

The XML.escape is very basic and when working with latin accents I can not reach a good result!

Will no escape latin accents and if I escape before then the result will be ã (madness)

I suggest to use: org.apache.commons.lang3.StringEscapeUtils.escapeHtml4

Is the better escape solution, works like a charm with all characters in my experience.

Or adds these methods to avoid the default escape:

  • XML.toString(Object object, String tagName, boolean escape)
  • XML.toString(Object object, boolean escape)

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions