Env.parseVariable returns wrong parsed message if default value is used
Description
Environment
None
Activity
Carlos Ruiz
changed the StatusOctober 2, 2024 at 9:13 AM
Resolved
Closed
Carlos Ruiz
updated the Fix versionsAugust 12, 2024 at 3:02 PM
None
11
Carlos Ruiz
changed the StatusAugust 6, 2024 at 9:01 AM
Open
Resolved
Carlos Ruiz
updated the ResolutionAugust 6, 2024 at 9:01 AM
None
Fixed
Carlos Ruiz
updated the Fix versionsAugust 6, 2024 at 9:01 AM
None
12
Peter Takacs
updated the DescriptionAugust 5, 2024 at 6:52 AM
The iDempiere syntax of the Env.parseVariable method is the following: @Variable:DefaultFallback@. If the “keepUnparseable“ flag is set for the method, it must return the same string (@Variable:DefaultFallback@) if the variable was not found in the context, but currently it returns @Variable@ instead.
It causes problems e.g. with HTML content in mail templates:
Unparsed
<a href=“[mailto:info@flolivery.sk|mailto:info@flolivery.sk]" style="color:#000000" rel="nofollow">[info@flolivery.sk|mailto:info@flolivery.sk]</a>
Parsed (should’ve been the same as unparsed)
<a href=“[mailto:info@flolivery.sk|mailto:info@flolivery.sk]" [style="color@flolivery.sk|]</a>
The iDempiere syntax of the Env.parseVariable method is the following: @Variable:DefaultFallback@. If the “keepUnparseable“ flag is set for the method, it must return the same string (@Variable:DefaultFallback@) if the variable was not found in the context, but currently it returns @Variable@ instead.
It causes problems e.g. with HTML content in mail templates:
Unparsed
<a href=“[mailto:info@testemail.|mailto:info@flolivery.sk]com" style="color:#000000" rel="nofollow">[info@testemail.|mailto:info@flolivery.sk]com</a>
Parsed (should’ve been the same as unparsed)
<a href=“[mailto:info@testemail.|mailto:info@flolivery.sk]com" [style="color@|][testemail.|mailto:info@flolivery.sk]com</a>
Peter Takacs
created the Work itemAugust 5, 2024 at 6:51 AM
The iDempiere syntax of the Env.parseVariable method is the following: @Variable:DefaultFallback@. If the “keepUnparseable“ flag is set for the method, it must return the same string (@Variable:DefaultFallback@) if the variable was not found in the context, but currently it returns @Variable@ instead.
It causes problems e.g. with HTML content in mail templates:
Unparsed
<a href=“mailto:info@testemail.com" style="color:#000000" rel="nofollow">info@testemail.com</a>
Parsed (should’ve been the same as unparsed)
<a href=“mailto:info@testemail.com" style="color@testemail.com</a>