diff --git a/boards/static/js/main.js b/boards/static/js/main.js --- a/boards/static/js/main.js +++ b/boards/static/js/main.js @@ -62,21 +62,18 @@ function updateFavPosts() { allNewPostCount += newPostCount; if (includePostBody) { - var post = $(dict.post); - - var id = post.find('.post_id'); - var title = post.find('.title'); - var favThreadNode = $('
'); - favThreadNode.append(id); + favThreadNode.append($(dict.post_url)); favThreadNode.append(' '); - favThreadNode.append(title); + favThreadNode.append($('' + dict.title + '')); if (newPostCount > 0) { favThreadNode.append(' (+' + newPostCount + ")"); } favoriteThreadPanel.append(favThreadNode); + + addRefLinkPreview(favThreadNode[0]); } }); diff --git a/boards/views/api.py b/boards/views/api.py --- a/boards/views/api.py +++ b/boards/views/api.py @@ -263,8 +263,8 @@ def api_get_new_posts(request): fav_thread_dict['new_post_count'] = new_post_count if include_posts: - fav_thread_dict['post'] = op.get_post_data( - format_type=DIFF_TYPE_HTML) + fav_thread_dict['post_url'] = op.get_link_view() + fav_thread_dict['title'] = op.title if new_post_count > 0: fav_thread_dict['newest_post_link'] = new_posts.first()\ .get_absolute_url()