aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r--client/src/app/shared/misc/utils.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts
index e2e4c5b36..64bc69b0d 100644
--- a/client/src/app/shared/misc/utils.ts
+++ b/client/src/app/shared/misc/utils.ts
@@ -88,6 +88,12 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
88 return fd 88 return fd
89} 89}
90 90
91function lineFeedToHtml (obj: object, keyToNormalize: string) {
92 return immutableAssign(obj, {
93 [keyToNormalize]: obj[keyToNormalize].replace(/\r?\n|\r/g, '<br />')
94 })
95}
96
91export { 97export {
92 viewportHeight, 98 viewportHeight,
93 getParameterByName, 99 getParameterByName,
@@ -97,5 +103,6 @@ export {
97 isInSmallView, 103 isInSmallView,
98 isInMobileView, 104 isInMobileView,
99 immutableAssign, 105 immutableAssign,
100 objectToFormData 106 objectToFormData,
107 lineFeedToHtml
101} 108}