From 1b6772803380c38d5a8726714b26722311a5633f Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 25 Aug 2015 16:08:16 -0700 Subject: [PATCH] fix(draft-list): Only parse the first 400 characters of HTML to create plaintext snippet It's possible that 400 characters isn't enough to get any plaintext (if the body begins with a style tag, for example.) Until we get a better solution in place, we need to do this to avoid parsing the king james bible in my draft. --- internal_packages/thread-list/lib/draft-list.cjsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal_packages/thread-list/lib/draft-list.cjsx b/internal_packages/thread-list/lib/draft-list.cjsx index af518da78..5a9492a8e 100644 --- a/internal_packages/thread-list/lib/draft-list.cjsx +++ b/internal_packages/thread-list/lib/draft-list.cjsx @@ -16,9 +16,9 @@ class DraftList extends React.Component componentWillMount: => snippet = (html) => @draftSanitizer ?= document.createElement('div') - @draftSanitizer.innerHTML = html + @draftSanitizer.innerHTML = html[0..400] text = @draftSanitizer.innerText - text[0..140] + text[0..200] c1 = new ListTabular.Column name: "Name"