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.
This commit is contained in:
Ben Gotow 2015-08-25 16:08:16 -07:00
parent bb887a4ae8
commit 633079bf3f

View file

@ -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"