mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Display trimmed down version of htmlBody and fix #1069
This commit is contained in:
parent
cb095e9663
commit
b765982a9e
2 changed files with 7 additions and 6 deletions
|
@ -39,8 +39,10 @@ buildCampaign = function (postsArray) {
|
|||
date: moment(post.postedAt).format("MMMM D YYYY")
|
||||
});
|
||||
|
||||
if (post.body)
|
||||
properties.body = marked(Telescope.utils.trimWords(post.body, 20)).replace('<p>', '').replace('</p>', ''); // remove p tags
|
||||
if (post.body) {
|
||||
var bodyText = Telescope.utils.stripHTML(post.htmlBody);
|
||||
properties.body = Telescope.utils.trimWords(bodyText, 20).replace('<p>', '').replace('</p>', ''); // remove p tags
|
||||
}
|
||||
|
||||
if(post.url)
|
||||
properties.domain = Telescope.utils.getDomain(post.url);
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<div class="post-meta">
|
||||
{{#if domain}}
|
||||
<a class="post-domain" href="">{{domain}}</a>
|
||||
|
|
||||
|
|
||||
{{/if}}
|
||||
|
||||
|
||||
<span class="post-submitted">
|
||||
{{#if profileUrl}}
|
||||
Submitted by <a href="{{profileUrl}}" class="comment-link" target="_blank">{{authorName}}</a>
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
{{#if body}}
|
||||
<div class="post-body-excerpt">
|
||||
{{{htmlBody}}}
|
||||
{{body}}
|
||||
<a href="{{postPageLink}}" class="comment-link" target="_blank">Read more</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -39,4 +39,3 @@
|
|||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue