swingx
  1. swingx
  2. SWINGX-346

JXErrorDialog doesn't escape <init> method

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: Util
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      346

      Description

      JXErrorDialog converts the stacktrace to HTML, but fails to escape the less-than
      and greater-than characters in the instance initialization method, <init>.

      Here is a couple of lines to escape the characters:
      for (StackTraceElement el :
      incidentInfo.getErrorException().getStackTrace()) {
      // Most HTML special characters can't occur in a stack
      // trace, but there is the pseudo-method "<init>"...
      String s = el.toString().replace("<init>", "<init>");
      html.append(" " + s + "\n");

        Activity

        Hide
        rbair added a comment -

        Thanks for the report. I also now escape (hopefully with some accuracy ) the
        error message text, since that could very easily contain invalid HTML
        characters. I'm not being complete – only escaping &, <, >.

        Show
        rbair added a comment - Thanks for the report. I also now escape (hopefully with some accuracy ) the error message text, since that could very easily contain invalid HTML characters. I'm not being complete – only escaping &, <, >.

          People

          • Assignee:
            rbair
            Reporter:
            neilweber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: