Updated all apps and widgets with explicit safely marked strings

This commit is contained in:
Roberto Rosario
2011-07-01 20:53:37 -04:00
parent a0b2e5f864
commit f0f0f4fc2e
17 changed files with 119 additions and 86 deletions

16
apps/history/widgets.py Normal file
View File

@@ -0,0 +1,16 @@
from django.utils.safestring import mark_safe
def history_entry_object_link(entry):
return mark_safe(u'<a href="%(url)s">%(label)s</a>' % {
'url': entry.content_object.get_absolute_url() if entry.content_object else u'#',
'label': unicode(entry.content_object) if entry.content_object else u''
}
)
def history_entry_summary(entry):
return mark_safe(u'<a href="%(url)s">%(label)s</a>' % {
'url': entry.get_absolute_url(),
'label': unicode(entry.get_processed_summary())
})