Replaced native trim() with query.trim() because IE8 is not supporting it.

This commit is contained in:
Martin Edenhofer 2012-11-29 21:05:45 +01:00
parent 28b5bb6cf7
commit 6ee8429a9e
2 changed files with 4 additions and 2 deletions

View file

@ -439,7 +439,8 @@ class Article extends App.Controller
# build html body # build html body
# cleanup body # cleanup body
@article['html'] = @article.body.trim() # @article['html'] = @article.body.trim()
@article['html'] = $.trim( @article.body.trim() )
@article['html'].replace( /\n\r/g, "\n" ) @article['html'].replace( /\n\r/g, "\n" )
@article['html'].replace( /\n\n\n/g, "\n\n" ) @article['html'].replace( /\n\n\n/g, "\n\n" )

View file

@ -70,7 +70,8 @@ class _Singleton
else if document.selection else if document.selection
text = document.selection.createRange().text text = document.selection.createRange().text
if text if text
text = text.toString().trim() # text = text.toString().trim()
text = $.trim( text.toString() )
text text
# get current selection # get current selection