Hi Boris, Is there a chance to prepare a small app to reproduce this problem? It would help me debug the problem.
Regards Łukasz pon., 29 sie 2022 o 09:52 Boris Petrov <bo...@profuzdigital.com> napisał(a): > > Hi all, > > I updated my Struts version to 6 and struts2-jquery-plugin to 5 (and > struts2-bootstrap-plugin to 5 but I don't think that's relevant). I'm > having troubles with the `escapeAmp` functionality. The following code: > > <div id="div${id}" class="d-inline-block"></div> > <s:url action="forgottenPassword" var="acUrl" escapeAmp="false"> > <s:param name="email" value="%{email}"></s:param> > <s:param name="ajax" value="true"></s:param> > </s:url> > <sj:a id="link%{id}" href="%{#acUrl}" targets="div%{id}" > indicator="loader%{id}" > parentTheme="bootstrap" button="false" cssClass="btn btn-sm > btn-outline-primary"> > <span id="loader${id}" class="spin-loader" > style="display:none"></span> Reset password > </sj:a> > > Worked fine in Struts 2.5.30. Upgrading to Struts 6, I noticed first > that `id="link%{id}"` had stopped working - that string was used > literally as the `id` and wasn't working as expected. I guess that's > expected and something was changed in v6. I'm just mentioning it for you > to say if that's not actually the case. > > But the real problem is `escapeAmp` doesn't seem to work any more. In > the generated JavaScript, I see the following - > `options_anchor_922437047.hrefparameter = > "email=boris%40example.com&ajax=true";`. As you see, there is > `&` instead of `&`. This makes the action on the backend not set the > `ajax` variable correctly. I can't seem to make that work no matter what > I try. If I remove `var="acUrl"`, the resulting URL looks correct with > or without `escapeAmp` which I also find strange. > > I'm not sure if I'm doing something wrong or something has changed? > > Thanks in advance, > Boris > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org