File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " go-web-app " : patch
3+ ---
4+
5+ Auto append https:// for incomplete URLs in [ #1505 ] ( https://github.com/IFRCGo/go-web-app/issues/1505 )
Original file line number Diff line number Diff line change @@ -346,6 +346,18 @@ export function getValueFromImportTemplate<
346346
347347 if ( schema . type === 'input' ) {
348348 const value = formValues [ fieldName ] ;
349+ if (
350+ ( fieldName === 'source_information__source__0__source_link'
351+ || fieldName === 'source_information__source__1__source_link'
352+ || fieldName === 'source_information__source__2__source_link'
353+ || fieldName === 'source_information__source__3__source_link'
354+ || fieldName === 'source_information__source__4__source_link'
355+ )
356+ && isDefined ( value ) && ( typeof value === 'string' ) && ! value . includes ( '://' )
357+ ) {
358+ // TODO: we need to find a better solution to this
359+ return `https://${ value } ` ;
360+ }
349361 // TODO: add validation from schema.validation
350362 return value ;
351363 }
You can’t perform that action at this time.
0 commit comments