Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-152

ValidatorTool generates invalid XHTML even when in XHTML mode

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0.x, 3.0
    • VelocityStruts
    • None

    Description

      When using the validator tool in XHTML mode, the main "validate" method emits code like this:

      function validateMyForm(form) {
      if (bCancel)
      return true;
      else

      { var formValidationResult; formValidationResult = validateInteger(form) && validateRequired(form) && validateMaxLength(form) && validateMask(form) && validateIntRange(form); return (formValidationResult == 1); }

      Note the use of bare "&" characters, which is not valid XHTML.

      Most web browsers will ignore this little quirk unless they are in XML parsing mode (usually enabled by setting the content-type to "application/xhtml+xml").

      Here is a reference to the discussion on the user list:
      http://markmail.org/thread/jtuqduopuikwtvqm

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            chris@christopherschultz.net Christopher Schultz
            chris@christopherschultz.net Christopher Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment