在菜单标签和工具提示中使用%时,Firefox插件不起作用 [英] Firefox addon doesn't work when using % in menu label and tooltip

查看:199
本文介绍了在菜单标签和工具提示中使用%时,Firefox插件不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Firefox插件,当我使用%作为菜单标签和工具提示时,插件无法正常工作(不会显示在Firefox上)。



 <!ENTITY addonName.menuX%09 (TAB)> 

在.xul这样的文件里:

 < menuitem class =menuitem-iconicimage =chrome://addonName/skin/image.pngtooltiptext =& addonName.menuX;标签= &安培; addonName.menuX; oncommand =addonName.function('X')/> 

如果我从<!ENTITY addonName.menuX% 09(Tab)> 它工作正常。我尝试使用反斜杠转义,但仍然无法正常工作,所以如何在插件菜单中打印%?

解决方案

unicode等价于% \\\% 应该可以工作。


I am working on a firefox addon, and when I use % for a menu label and tooltip the addon doesn't work (doesn't show up on firefox).

I am using the % in a .dtd file like this:

<!ENTITY addonName.menuX "%09 (Tab)">

And in the .xul file like this:

<menuitem class="menuitem-iconic" image="chrome://addonName/skin/image.png" tooltiptext="&addonName.menuX;" label="&addonName.menuX;" oncommand="addonName.function( 'X' )" />

If I delete the % from <!ENTITY addonName.menuX "%09 (Tab)"> it works fine. I tried escaping it with a backslash but still doesn't work, so how do I print % in the addon menu?

解决方案

unicode equivalent of % which is \u0025 should work.

这篇关于在菜单标签和工具提示中使用%时,Firefox插件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆