소스 검색

Disallow newlines in shortcut expansions [TEMP]

Vijayakrishnan 4 년 전
부모
커밋
9406a05390
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      resources/views/app/patient/note/dashboard.blade.php

+ 3 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -201,7 +201,9 @@
                         $shortcuts = $pro->shortcuts;
                         $packed = [];
                         foreach ($shortcuts as $shortcut) {
-                            $packed[] = $shortcut->shortcut . '|||' . $shortcut->text;
+                            // TEMP Solution - disallow newlines in shortcut expansions
+                            // $packed[] = $shortcut->shortcut . '|||' . $shortcut->text;
+                            $packed[] = $shortcut->shortcut . '|||' . preg_replace("/[\\r\\n]+/i", " ", $shortcut->text);
                         }
                         $packed = implode("^^^", $packed);
                         $shortcuts = $packed;