diff --git a/jperm/views.py b/jperm/views.py
index a9eec6aaa93f4eb3a0d0b2c01b69a08165a2b81e..c5bfdfb03c8a9f073bd56e6a1dd58bc1d0dfba6f 100644
--- a/jperm/views.py
+++ b/jperm/views.py
@@ -482,7 +482,7 @@ def cmd_add(request):
     if request.method == 'POST':
         name = request.POST.get('name')
         dept_id = request.POST.get('dept_id')
-        cmd = ','.join(request.POST.get('cmd').split())
+        cmd = ','.join(request.POST.get('cmd').split('\n'))
         comment = request.POST.get('comment')
         dept = DEPT.objects.filter(id=dept_id)
 
@@ -512,7 +512,7 @@ def cmd_add_adm(request):
 
     if request.method == 'POST':
         name = request.POST.get('name')
-        cmd = ','.join(request.POST.get('cmd').split())
+        cmd = ','.join(request.POST.get('cmd').split('\n'))
         comment = request.POST.get('comment')
 
         try: