From c0e95f644a2cda92f01c7b4e6e34a734f6f6f678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 28 Mar 2019 11:04:39 +0100 Subject: [PATCH] MOBILE-2915 data: Trim url field --- src/addon/mod/data/fields/url/providers/handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addon/mod/data/fields/url/providers/handler.ts b/src/addon/mod/data/fields/url/providers/handler.ts index ae8eb55d5..1854df829 100644 --- a/src/addon/mod/data/fields/url/providers/handler.ts +++ b/src/addon/mod/data/fields/url/providers/handler.ts @@ -54,7 +54,7 @@ export class AddonModDataFieldUrlHandler extends AddonModDataFieldTextHandler { { fieldid: field.id, subfield: '0', - value: inputData[fieldName] || '' + value: (inputData[fieldName] && inputData[fieldName].trim()) || '' } ]; }