Updated all apps and widgets with explicit safely marked strings
This commit is contained in:
16
apps/history/widgets.py
Normal file
16
apps/history/widgets.py
Normal 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())
|
||||
})
|
||||
Reference in New Issue
Block a user