indiv-screenlets-dev team mailing list archive
-
indiv-screenlets-dev team
-
Mailing list archive
-
Message #00214
[Bug 298995] Re: [Stocks] StocksScreenlet.py Display incorrect name if there's an ampersand
** Changed in: indiv-screenlets
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of
Individual Screenlets Developers, which is subscribed to Individual
Screenlets.
https://bugs.launchpad.net/bugs/298995
Title:
[Stocks] StocksScreenlet.py Display incorrect name if there's an
ampersand
Status in Screenlets — individual widgets development:
Fix Released
Bug description:
StocksScreenlet.py 0.4
When adding a stock which name contains an & (ampersand), the name
displayed is "Last trade: xxxx.xx" (xxxx.xx being the value).
Try with ^GSPTSE which is "S&P/TSX Composite index"
I don't know python, but a quick fix for me was to change the line 128
from:
self.draw_text(ctx, '<b>' + self.__stockdata['name'] + '</b>', 10, 10, font, 12, self.width)
to
self.draw_text(ctx, '<b>' + self.__stockdata['name'].replace('&','&') + '</b>', 10, 10, font, 12, self.width)
Maybe there's a better way to do it. I didn't tried with other weird
html entities.
To manage notifications about this bug go to:
https://bugs.launchpad.net/indiv-screenlets/+bug/298995/+subscriptions