diff options
Diffstat (limited to 'askbot/templates/question.html')
-rw-r--r-- | askbot/templates/question.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/askbot/templates/question.html b/askbot/templates/question.html index 9a508a2f..a8aef0a7 100644 --- a/askbot/templates/question.html +++ b/askbot/templates/question.html @@ -43,6 +43,10 @@ return nodes; }; + var getTextContent = function(node) { + return node.innerText || node.textContent; + }; + var hasAttribute = function(node, attrName) { if (node.hasAttribute) { return node.hasAttribute(attrName); @@ -139,7 +143,7 @@ //todo: this is not reliable var answerBodyNodes = answerBody.childNodes; var answerElement = answerBodyNodes[answerBodyNodes.length - 1]; - if (trim(answerElement.textContent).length > askbot['data']['maxCommentLength']) { + if (trim(getTextContent(answerElement)).length > askbot['data']['maxCommentLength']) { repostAsQuestionComment.parentNode.removeChild(repostAsQuestionComment); repostAsPrevAnsComment.parentNode.removeChild(repostAsPrevAnsComment); } else if (parseInt(post_id) === data['oldestAnswerId']) { |