Explorar el Código

Disallow newlines in shortcut expansions [TEMP]

Vijayakrishnan hace 4 años
padre
commit
9406a05390
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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;