~kylehuff/awn-extras/bug534061-ValueError_fix

« back to all changes in this revision

Viewing changes to applets/maintained/feeds/classes.py

  • Committer: Matt
  • Date: 2010-03-06 21:39:09 UTC
  • Revision ID: sharkbaitbobby@gmail.com-20100306213909-uc6ka5aaly6o0xwm
 * feeds: Fix ampersands in items; shortened strings are longer
 * file-browser-launcher: icons can be loaded by file path
 * slickswitcher: add version and website to about dialog
 * to-do: don't include 100%-progress items in icon number

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
        if siteid in self.applet.favicons:
214
214
            #Check if the favion is less than a week old
215
215
            if self.applet.favicons[siteid] + 604800L > long(time.time()):
216
 
                self.icon = os.path.join(cache_dir, siteid + '.ico')
 
216
                self.icon = siteid
217
217
                self.applet.got_favicon(self)
218
218
 
219
219
                return
922
922
    if button:
923
923
        widget = widget.child
924
924
 
925
 
    widget.set_markup('<span font_weight="bold">%s</span>' % widget.get_text())
 
925
    widget.set_markup('<span font_weight="bold">%s</span>' % safify(widget.get_text()))
926
926
 
927
927
def deboldify(widget, button=False):
928
928
    if button:
929
929
        widget = widget.child
930
930
 
931
931
    widget.set_markup(widget.get_text())
 
932
 
 
933
def safify(text):
 
934
  return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')