Wouldn't it be simpler to use

<#escape x as x?html>

?

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 7/29/2015 6:33 AM, jler...@apache.org wrote:
Author: jleroux
Date: Wed Jul 29 13:33:12 2015
New Revision: 1693258

URL: http://svn.apache.org/r1693258
Log:
Fixes an issue crossed while checking OFBIZ-6504 - how to Create PDF with 
password Protected in Ofbiz

There was still an issue in normal (not PDF) mode, I thought I had just to replace \' by void, but I got fooled, 
because \' already transformed in Unicode characters (&#x5c;&#x27;) at this stage. So I replaced 
"&#x5c;&#x27;" by "&#x27;"

Modified:
     ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1693258&r1=1693257&r2=1693258&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Wed Jul 29 
13:33:12 2015
@@ -231,7 +231,7 @@ under the License.
    <span class="ui-widget">
      <select name="${name?default("")}<#rt/>" <@renderClass className alert /><#if id?has_content> id="${id}"</#if><#if multiple?has_content> multiple="multiple"</#if><#if 
otherFieldSize gt 0> onchange="process_choice(this,document.${formName}.${otherFieldName})"</#if><#if event?has_content> ${event}="${action}"</#if><#if size?has_content> 
size="${size}"</#if><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>>
        <#if firstInList?has_content && currentValue?has_content && 
!multiple?has_content>
-        <option selected="selected" 
value="${currentValue}">${explicitDescription}</option><#rt/>
+        <option selected="selected" 
value="${currentValue}">${explicitDescription?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
          <option value="${currentValue}">---</option><#rt/>
        </#if>
        <#if allowEmpty?has_content || !options?has_content>
@@ -239,9 +239,9 @@ under the License.
        </#if>
        <#list options as item>
          <#if multiple?has_content>
-          <option<#if currentValue?has_content && item.selected?has_content> selected="${item.selected}" <#elseif 
!currentValue?has_content && noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> selected="selected" </#if> 
value="${item.key}">${item.description}</option><#rt/>
+          <option<#if currentValue?has_content && item.selected?has_content> selected="${item.selected}" <#elseif !currentValue?has_content && 
noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> selected="selected" </#if> 
value="${item.key}">${item.description?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
          <#else>
-          <option<#if currentValue?has_content && currentValue == item.key && dDFCurrent?has_content && "selected" == dDFCurrent> 
selected="selected"<#elseif !currentValue?has_content && noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> 
selected="selected"</#if> value="${item.key}">${item.description}</option><#rt/>
+          <option<#if currentValue?has_content && currentValue == item.key && dDFCurrent?has_content && "selected" == dDFCurrent> selected="selected"<#elseif 
!currentValue?has_content && noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> selected="selected"</#if> 
value="${item.key}">${item.description?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
          </#if>
        </#list>
      </select>


Reply via email to