[jira] [Commented] (OFBIZ-12026) Hyperlink title under form widget doesn't support character encoding for special characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-12026) Hyperlink title under form widget doesn't support character encoding for special characters

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-12026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270690#comment-17270690 ]

ASF subversion and git services commented on OFBIZ-12026:
---------------------------------------------------------

Commit bbc63bc470286693b5984c3a8d3bcac08214edf0 in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=bbc63bc ]

Fixed: Ampersand in Party not displayed correctly (OFBIZ-12140)

In the reported case, ModelFormField::getDescription double HTML encodes the
description when both the entity and the description contain an ampersand.

A solution is to test if the description is already HTML encoded before encoding
it again. If HTML encoded then only String encodes it.

BTW I'm not sure it's useful but it's harmless, the same solution can be applied
to OFBIZ-12026 and similarly in renderableFtlFormElementsBuilder::encode. I'll
do as improvements...

Thanks: Andrew Waters for report and help in analysis


> Hyperlink title under form widget doesn't support character encoding for special characters
> -------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-12026
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12026
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 17.12, Trunk
>            Reporter: Pradeep Choudhary
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: 18.12.01, 17.12.05
>
>         Attachments: Screenshot from 2020-09-26 18-16-25.png
>
>
> When we use any title with special characters for hyperlink tag, it shows broken string on UI.
> here,
> {code:java}
>  <field name="importexport" title=" " use-when="hasBasicPermission" widget-style="buttontext">
>  <hyperlink description="${uiLabelMap.CommonImportExport}" target="ImportExport">
>  <parameter param-name="organizationPartyId" from-field="partyId"/>
>  </hyperlink>
> </field>
> {code}
> <hyperlink description="${uiLabelMap.CommonImportExport}"  target="ImportExport">
> It should render a button with the title "Import/Export. But it shows as 
> {code:java}
> Import&#x2f;Export{code}
> Please check attached image for the same.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)