On 10/03/2010, at 5:36 PM, Adam Heath wrote: > jler...@apache.org wrote: >> Author: jleroux >> Date: Thu Mar 11 00:20:57 2010 >> New Revision: 921643 >> >> URL: http://svn.apache.org/viewvc?rev=921643&view=rev >> Log: >> Following r921421, here is the right and simplest solution (KISS way). >> Simply encoding the tooltip (why I did not think about that before, really >> sometimes I wonder how my brain is working, I need to stop working for it to >> begin to work) >> There are no needs to encode char like >, but of course < is needed (in he >> XML file) since else there is a problem in the XML labels file (always the >> same issue: around vs inside) >> So yes, it's only a matter of encoding at the right place, ie before the >> "around vs inside" issue arises >> Good night ;) >> >> Modified: >> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java >> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml >> >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java >> >> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=921643&r1=921642&r2=921643&view=diff >> ============================================================================== >> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java >> (original) >> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Thu Mar >> 11 00:20:57 2010 >> @@ -874,6 +874,10 @@ public class UtilHttp { >> return htmlString.replaceAll(" ", "%20"); >> } >> >> + public static String encodeQuotes(String htmlString) { >> + return htmlString.replaceAll("\"", "\\\\\""); >> + } >> + > > > Sorry, it's not a UtilHttp function, it has nothing at all to do with > http, or html. This is a freemarker only thing. >
+1, either the macro renderer itself or maybe the freemarker worker would be better homes for it.
smime.p7s
Description: S/MIME cryptographic signature