From: "Adam Heath" <[email protected]>
[email protected] wrote:
Author: jleroux
Date: Wed Mar 10 16:12:30 2010
New Revision: 921421

URL: http://svn.apache.org/viewvc?rev=921421&view=rev
Log:
You can't use double quote in tooltips. I tried to find a quick way to allow this in MacroFormRenderer.appendTooltip() but gave up, too narrow need.

Modified:
    ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

Modified: ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=921421&r1=921420&r2=921421&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/trunk/framework/example/config/ExampleUiLabels.xml Wed Mar 10 
16:12:30 2010
@@ -97,7 +97,7 @@
     </property>
     <property key="ExampleDateField10Tooltip">
<value xml:lang="en">Same as above, uses the nowTimestamp variable (always available in the form context) to set the default value to now</value> - <value xml:lang="fr">La même chose mais la variable nowTimestamp (toujours disponible dans context) est utilisée pour affecter la valeur par défaut à "maintenant"</value> + <value xml:lang="fr">La même chose mais la variable nowTimestamp (toujours disponible dans context) est utilisée pour affecter la valeur par défaut à 'maintenant'</value> <value xml:lang="it">Lo stesso di sopra, usare la variabile nowTimestamp (sempre disponibile nel contesto della form) per impostare il valore di default ad adesso</value>
         <value 
xml:lang="zh">同上,使用nowTimstamp变量(在表单中总是可用的)来把缺省值设置为现在</value>
     </property>

tooltip.replaceAll("\"", "&quot;"), also handling any other weird html
characters, like < or > or &.

In UtilHttp.java I tried to create (and use in appendTooltip)
public static String encodeQuotes(String htmlString) {
return htmlString.replaceAll("\"", "%34");
}

Mimicking encodeBlanks, but it did not works as we have to distinguish between quote around the tooltip and inside the tooltip. I don't think your suggestion will write either, I will try though

Additionally, appendTooltip should not be using a StringWriter.

I agree about that point

Jacques







Reply via email to