summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/textviewer/textviewer.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/textviewer/textviewer.js b/plugins/textviewer/textviewer.js
index fd6b48f8896..788396d3d70 100644
--- a/plugins/textviewer/textviewer.js
+++ b/plugins/textviewer/textviewer.js
@@ -27,6 +27,8 @@ OC_TextViewer.hideText=function(){
OC_TextViewer.prepareText=function(text){
text=text.replace(/\n/g,"<br/>\n");
+ text=text.replace(/ /g,"&nbsp;");
+ text=text.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");
return text;
}