[
https://issues.apache.org/jira/browse/WW-5782?focusedWorklogId=1047794&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1047794
]
ASF GitHub Bot logged work on WW-5782:
--------------------------------------
Author: ASF GitHub Bot
Created on: 16/Oct/26 10:06
Start Date: 16/Oct/26 10:06
Worklog Time Spent: 10m
Work Description: sonarqubecloud[bot] commented on PR #2034:
URL: https://github.com/apache/struts/pull/2034#issuecomment-6213116329
## [](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=2034)
**Quality Gate passed**
Issues
 [0 New
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2034&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2034&issueStatuses=ACCEPTED)
Measures
 [0 Security
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=2034&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2034&metric=new_coverage&view=list)
 [0.0% Duplication on New
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2034&metric=new_duplicated_lines_density&view=list)
<!
Issue Time Tracking
-------------------
Worklog Id: (was: 1047794)
Time Spent: 20m (was: 10m)
> Anchor tag silently drops nested param tags when href is set
> ------------------------------------------------------------
>
> Key: WW-5782
> URL: https://issues.apache.org/jira/browse/WW-5782
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Tags
> Reporter: Lukasz Lenart
> Priority: Major
> Fix For: 7.5.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When {{<s:a>}} has an explicit {{href}} attribute, nested {{<s:param>}} tags
> are ignored and never appear in the rendered link. They are only used when
> the URL is built from the {{url}}-tag attributes ({{value}}, {{action}},
> {{namespace}}, ...).
> The main example in the {{Anchor}} javadoc shows exactly this combination, so
> it suggests behaviour the tag does not have:
> {code}<s:a id="link1" href="/do-it.action">
> <img border="none" src="<%=request.getContextPath()%>/images/delete.gif"/>
> <s:param name="id" value="1"/>
> </s:a>
> {code}
> h3. Observed
> Same nested param, different way of giving the target:
> ||Tag||Rendered||
> |{{<s:a href="/do-it.action">}} with {{<s:param name="id" value="1"/>}}|{{<a
> href="/do-it.action"></a>}}|
> |{{<s:a value="/do-it.action">}} with {{<s:param name="id" value="1"/>}}|{{<a
> href="/do-it.action?id=1"></a>}}|
> Reproduced on {{main}} (7.5.0-SNAPSHOT) with {{AnchorTagTest}}-style tests
> using {{ParamTag}}.
> h3. Cause
> In {{Anchor.evaluateExtraParams()}} the {{href}} branch only evaluates the
> {{href}} expression; the parameters collected from nested {{<s:param>}} tags
> ({{urlParameters}}) are consumed only by the {{else}} branch that renders a
> URL through {{UrlRenderer}}. No existing test covers {{href}} together with
> nested params ({{AnchorTagTest#testAddParameters}} sets an {{href}} but adds
> no params).
> h3. Expected
> Either nested params are appended to an explicit {{href}}, or the combination
> is documented as unsupported and the javadoc example is corrected. Silently
> dropping them is the one outcome that should not stay.
> Related: WW-3571 (rendering of {{<s:a>}} without any {{href}} or URL
> attributes) touches the same method.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)