escape_html function is needed when printing in markup
'src/mussorgsky.py',
'src/mutagen_backend.py',
'src/player_backend.py',
- 'src/tracker_backend.py'])]
+ 'src/tracker_backend.py',
+ 'src/utils.py'])]
setup(name = 'mussorgsky',
version = '0.1',
--- /dev/null
+def escape_html (text, max_length=40):
+ if (len (text) > max_length):
+ cutpoint = text.find (' ', max_length-10)
+ if (cutpoint == -1 or cutpoint > max_length):
+ cutpoint = max_length
+ text = text [0:cutpoint] + "..."
+ return text.replace ("&","&").replace ("<", "<").replace (">", ">").replace ("\"", """)
+