ajax4jsf
  1. ajax4jsf
  2. AJAX4JSF-20

JSEncoder generates \u escape sequence with two hex digits only

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      20

      Description

      org.ajax4jsf.framework.util.javascript.JSEncoder.encode(char c)

      can generate escape sequences of the form:

      \uXX where X is a hex digit.

      \u should, however, be followed by four hex digits, so an escape sequence of the
      form \xXX should actually be generated instead.

      Source code lines 105-106 should read instead:

      char ret[] =

      { '\\', 'x', ENCODE_HEX[c >> 0x4 & 0xf], ENCODE_HEX[c & 0xf] }

      ;

      where 'u' has been replaced by 'x'.

      Regards,
      Claus

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            ajax4jsf-issues
            Reporter:
            cschmid
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: