From fec102216b6cbdbef74c0a78fe7475d3228ea00d Mon Sep 17 00:00:00 2001 From: Eduardo Riesco Date: Wed, 26 Sep 2018 18:22:40 +0000 Subject: [PATCH] Improving URL sanitation. --- repository/Grafoscopio-Utils/GrafoscopioUtils.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Grafoscopio-Utils/GrafoscopioUtils.class.st b/repository/Grafoscopio-Utils/GrafoscopioUtils.class.st index b88e6c1..62e4046 100644 --- a/repository/Grafoscopio-Utils/GrafoscopioUtils.class.st +++ b/repository/Grafoscopio-Utils/GrafoscopioUtils.class.st @@ -93,7 +93,7 @@ GrafoscopioUtils class >> sanitize: url [ modUrl := url. [modUrl asString endsWith: ' '] whileTrue: [ modUrl := modUrl copyFrom: 1 to: (modUrl size - 1) ]. - (url asString beginsWith: 'http://') + (url asString beginsWith: 'http') "http or https" ifFalse: [ sanitized := ('http://', modUrl) asUrl ] ifTrue: [ sanitized := modUrl asUrl ]. ^ sanitized