Browse Source

Disallow newlines in shortcut expansions [TEMP]

Vijayakrishnan 4 năm trước cách đây
mục cha
commit
9406a05390
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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;