Your message did get through to the list. Not sure what additional
light I can shed given what the comment regarding JavaScript already
says.

If you have a need then I'd suggest creating a Jira ticket - although
most peoples attention is focused on Struts 2.x now, so whether you
would find a volunteer to fix it is another matter. A good quality
patch (for both the regular RewriteTag and "ELRewriteTag" flavours)
might help - but its no guarantee.

 https://issues.apache.org/struts/browse/STR

Niall

On 2/8/07, Joseph Ryan <[EMAIL PROTECTED]> wrote:
Hi Niall, I am not sure why, but my messsage here does not seem to be
getting on to the list. I think it is an interesting point since the Struts
taglib documentation claims conformance to HTML 4.01. Could you shed any
light on this?

Regards, Joe


---------- Forwarded message ----------
From: Joseph Ryan <[EMAIL PROTECTED]>
 Date: Feb 8, 2007 10:46 AM
Subject: Struts Taglib RewriteTag - conformance with HTML 4.01
To: [email protected]



Having looked at the source of this RewriteTag I see that encoding of the  &
character to &amp; is in XHTML mode only

Doesnt this violate HTML 4.01 specifications? Any thoughts to introtuce a
parameter, for example encodeSeparator true/false



public class RewriteTag extends LinkTag {
    //
---------------------------------------------------------
Public Methods

    /**
     * Render the appropriately encoded URI.
     *
     * @throws JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {
        // Generate the hyperlink URL
        Map params =

TagUtils.getInstance().computeParameters(pageContext,
paramId,
                paramName, paramProperty, paramScope, name, property, scope,
                transaction);

        String url = null;

        try {
            // Note that we're encoding the & character to &amp; in XHTML
mode only,
            // otherwise the & is written as is to work in javascripts.
            url = TagUtils.getInstance
().computeURLWithCharEncoding(pageContext,
                    forward, href, page, action, module, params, anchor,
false,
                    this.isXhtml(), useLocalEncoding);
        } catch (MalformedURLException e) {
            TagUtils.getInstance().saveException(pageContext, e);
            throw new JspException(messages.getMessage("rewrite.url",
                    e.toString()));
        }

        TagUtils.getInstance().write(pageContext, url);

        return (SKIP_BODY);
    }

    /**
     * Ignore the end of this tag.
     *
     * @throws JspException if a JSP exception has occurred
     */
    public int doEndTag() throws JspException {
        return (EVAL_PAGE);
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to