开发者

Firefox addon doesn't work when using % in menu label and tooltip

开发者 https://www.devze.com 2023-01-12 07:03 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消