Fix /r/<subreddit> in mailbox

This commit is contained in:
Keith Mitchell
2012-02-14 15:47:12 -08:00
parent 56753983a7
commit 033c36c93b
2 changed files with 12 additions and 12 deletions

View File

@@ -56,16 +56,16 @@
<%
author = WrappedUser(thing.author, thing.attribs, thing).render()
if thing.sr_id:
subreddit = '<a href="%s.compact">%s</a>' % (thing.subreddit.path,
thing.subreddit.name)
subreddit = '&nbsp;<a href="%s.compact">%s</a>&nbsp;' % \
(thing.subreddit.path, thing.subreddit.path)
if not thing.dest:
thing.dest = subreddit
author = thing.updated_author % dict(author=author, subreddit=subreddit)
taglinetext = thing.taglinetext % dict(when=thing.timesince,
author=u"<b>%s</b>" % author,
dest=u"<b>%s</b>" % thing.dest)
taglinetext = taglinetext.replace(' ', '&nbsp;')
taglinetext = thing.taglinetext.replace(' ', '&nbsp;')
taglinetext = taglinetext % dict(when=thing.timesince,
author=u"<b>%s</b>" % author,
dest=u"<b>%s</b>" % thing.dest)
%>
<div class="tagline">
${unsafe(taglinetext)}

View File

@@ -53,16 +53,16 @@ ${parent.thing_css_class(what)} ${"new" if thing.new else ""} ${"was-comment" if
<%
author = WrappedUser(thing.author, thing.attribs, thing).render()
if thing.sr_id:
subreddit = '<a href="%s">%s</a>' % (thing.subreddit.path,
thing.subreddit.path)
subreddit = '&nbsp;<a href="%s">%s</a>&nbsp;' % (thing.subreddit.path,
thing.subreddit.path)
if not thing.dest:
thing.dest = subreddit
author = thing.updated_author % dict(author=author, subreddit=subreddit)
taglinetext = thing.taglinetext % dict(when=thing.timesince,
author=u"<b>%s</b>" % author,
dest=u"<b>%s</b>" % thing.dest)
taglinetext = taglinetext.replace(' ', '&nbsp;')
taglinetext = thing.taglinetext.replace(' ', '&nbsp;')
taglinetext = taglinetext % dict(when=thing.timesince,
author=u"<b>%s</b>" % author,
dest=u"<b>%s</b>" % thing.dest)
%>
${unsafe(taglinetext)}
</span>